بسم الله الرحمن الرحيم
السلام عليكم
ممكن مساعدة بسيطة
اريد ان اجد معدل الرواتب(salary) في هذا البرنامج
#include<iostream.h>
struct student{
char name[5];
int ID;
long salary;
int adress;
};
void main(){
student A[3];
for(int i=1; i<3; i++){
cout<<" Enter the name of employee "<<i<<" ==";
cin>>A.name;
cout<<" Enter ID of employee"<<i<<" ==";
cin>>A.ID;
cout<<" Enter the salary of employee"<<i<<" ==";
cin>>A.salary;
cout<<" Enter the adress of employee "<<i<<" ==";
cin>>A.adress;
cout<<endl;
}
}ولكم جزيل الشكر