- تاريخ التسجيل
- 27 أكتوبر 2007
- المشاركات
- 2,307
- المجموعة
- أنثى
- الدفعة الدراسية
- معلومة خاصة
و عليكم السلام
أول خطأ كان طبعا في الـwhile
لازم
PHP:
while(GPA>=0.0)
بعدين في المسج اللي يطلع عند كل معدل
PHP:
if(GPA>=0&&GPA<=1.99)
cout<<"The student is placed on the dean's honor list"<<endl;
المفروض يسأل هني جم مرة رسب
مو يحطونه في لوحة الشرف للعميدة :mellow:
و حتى يوم قلتي له
PHP:
cin>>sf;
و هذا المسج طبعا لازم يكون داخل الـwhile
PHP:
cout<<"Enter astudent GPA (or negative to stop):"<<endl;
و هذا الحل الصحيح
PHP:
#include <iostream>
using namespace std;
int main()
{
double GPA;
int sf;
cout<<"Enter a student GPA (or negative to stop):"<<endl;
cin>>GPA;
while(GPA>=0.0 && GPA<=4.0)
{
if(GPA<=1.99)
{
cout<<"How many previous semester have the student falied:"<<endl;
cin>>sf;
{
if(sf>=2)
cout<<"The student is suspended."<<endl;
else
cout<<"The student is on probation."<<endl;
}
}
else if(GPA>=2.00 && GPA<=2.99)
cout<<"The student has passed the semester."<<endl;
else if(GPA>=3.00 && GPA<=3.49)
cout<<"The student is placed on the dean's honor list"<<endl;
else if (GPA>=3.50)
cout<<"The student is placed on the president 's honors list"<<endl;
cout<<"Enter a student GPA (or negative to stop):"<<endl;
cin>>GPA;
}
return 0;
}



ونسيت اغيره ههههه



