الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

عااااجل/سؤال بالstruct

بدأه m6afe8 في 7 مارس 2011 · 4 رد · 540 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله

عندي سؤال بالstruct حليت نصه وماعرفت الباقي

اتمنى احد يساعدني

.

.

.

.

.

.

Create a structure called employee that contains two members: an employee number

(type int) and the employee‟s compensation (in dollars; type float). Ask the user to fill

in this data for three employees, store it in three variables of type struct employee, and

then display the information for each employee.

ومشكوررررين

#2

وعليكم السلام ورحمه الله وبركاته ,

اقتباس
عندي سؤال بالstruct حليت نصه وماعرفت الباقي

اتمنى احد يساعدني

اطرح محاولتك تجنبًا لإغلاق الموضوع لمخالفته قوانين المنتدى .. وستجد المساعدة .

بالتوفيق :) ..

1

سبحآن الله وبحمده .. سبحآن الله العظيم .. ,

#3

هذا اللي عرفت احله

#include <iostream.h>

#include <conio.h>

struct employee

{int employeeNO;

float employeecompensation;

};

int main()

{employee employee1;

employee employee2;

employee employee3;

cout<<"Enter the employee NO of employee 1 "<<employee1.employeeNO;

cin>>employee1.employeeNO;

cout<<"\nEnter the compensation in dollars of employee 1 "<<employee1.employeecompensation;

cin>>employee1.employeecompensation;

cout<<"Enter the employee NO of employee 2 "<<employee2.employeeNO;

cin>>employee2.employeeNO;

cout<<"\nEnter the compensation in dollars of employee 2 "<<employee2.employeecompensation;

cin>>employee2.employeecompensation;

cout<<"Enter the employee NO of employee 3 "<<employee3.employeeNO;

cin>>employee3.employeeNO;

cout<<"\nEnter the compensation in dollars of employee 3 "<<employee3.employeecompensation;

cin>>employee3.employeecompensation;

getch();[/center

]return 0;

}

#4

كودك يحتاج لتعديل بسيط فقط :) .

#include <iostream>
using namespace std ; 
struct employee
{
	int employeeNO;
    float employeecompensation;
};
int main()
{
	employee empInfo[3];
	for (int i=0 ; i<3 ; i++)
	{
cout<<"Enter the employee NO of employee "<<(i+1)<<": ";
cin>>empInfo.employeeNO ;
cout<<"\nEnter the compensation in dollars of employee "<<(i+1)<<": ";
cin>>empInfo.employeecompensation;
cout<<endl;
	}

	for (int i=0 ; i<3 ; i++)
	{
		cout <<"\nThe Information For Employee "<<(i+1)<<endl;
		cout<<"The Number IS : " <<empInfo.employeeNO ;
		cout<<"\tThe Compensation IS : "<<empInfo.employeecompensation<<endl;
	}
system("pause");
return 0;
}

بالتوفيق .

1

سبحآن الله وبحمده .. سبحآن الله العظيم .. ,

#5

مشكوووور اخوي ما قصرت

الله لا يحرمك الاجر

.

.

.

.

.

.

.

نتلاقا في اسئلة ثانيه ان شاء الله هع هع :lol: :lol:

مواضيع مشابهة