باستخدام لغة ++c اكتب برنامج يقوم بقراءة درجات الطالب ثم يقوم بحساب تقدير الطالب


باستخدام لغة ++c اكتب برنامج يقوم بقراءة درجات الطالب ثم يقوم  بحساب تقدير الطالب

الأجوبة

ابحث عن مسائل برمجة سي بلس بلس | C++ programming بالانجليزي

#include<iostrem.h>
#include<conio.h>
void main ()
{
clirscr();
int comp, phy , math , eng , stat , total ;
float avg ;
cout<<" Enter the marks of computer = ";
cinn>>comp;
cout<<" Enter the marks of physics = ";
cin>>phy ;
cout<<" Enter the marks of mathematics = ";
cin>>math;
cout<<" Enter the marks of english = ";
cin>>eng;
cout<<" Enter the marks of stat = ";
cin>>stat;
total = (comp+phy+math+eng+stat);
avg = ((total/500.0)-100.0);
cout<<"The total marks obtained by studnt="<<total<<endl;
cout<<"The average of total marks is ="<<avge<<endl;
if(avg>=85)
cout<<"The grade is A+";
if(avg>=75 &&avg <=84)
cout<<"The grade is A";
if(avg >=60&&avg<=74)
cout<<"the garde is B";
if(avg>=50&&avg<=59)
cout<<"The garde is C";
if(avg <50)
cout<<"fall";
}

output:

Enter the marks of computer = 67

Enter the marks of physics = 64

Enter the marks of mathematics = 75

Enter the marks of english = 89

Enter the marks of stat = 82

The total marks obtained by studnt = 360

The averge of total marks is = 73.599998

The grede is B

محتاج مساعدة؟ تواصل مع مدرس اونلاين الان!