عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 06-05-2010, 01:32 AM   #5

زهرة البنفسج

مراقبة سابقاً

الصورة الرمزية زهرة البنفسج

 
تاريخ التسجيل: Jan 2009
التخصص: Computer Science
نوع الدراسة: إنتظام
المستوى: التاسع
الجنس: أنثى
المشاركات: 1,458
افتراضي رد: تكفوووون تساعدوني بليزززز (c++) ارجوكم والله معد يطلع معاي افكر

هذي محاولة للحل .....
بس إن شاءالله يكون صح؟؟؟؟
وإن شاءالله يكون هذا هو المطلوب؟؟؟؟؟؟؟؟؟؟؟؟؟؟
كود:
#include<iostream.h>
#include<conio.h>

void main()
{
 float x,t,n,y,m=0,v=0;
 cout<<"Enter the number of your subject : ";
 cin>>y;
 for(int i=1;i<=y;i++)
 {
  cout<<"\n\nEnter your grades : ";
  cin>>x;
  cout<<"Enter the no.of hour for this subject : ";
  cin>>n;
  if((x>=95)&&(x<=100))
    {
     t=5*n;
      cout<<"The grade is  A+\n The average for this subject is 5/5";
     }
  else if((x>=90)&&(x<=94))
         {
          t=4.75*n;
          cout<<"The grade is A \n The average for this subject is 4.75/5";
         }
       else if ((x>=85)&&(x<=89))
             {
               t=4.5*n;
             cout<<"The grade is B+ \n The average for this subject is 4.5/5";
             }
             else if ((x>=80)&&(x<=84))
                  {
                     t=4*n;
                     cout<<"The grade is B \n The average for this subject is 4/5";
                  }
                  else if ((x>=75)&&(x<=79))
                      {
                        t=3.5*n;
                         cout<<"The grade is C+ \n The average for this subject is 3.5/5";
                      }
                      else if ((x>=70)&&(x<=74))
                             {
                              t=3*n;
                            cout<<"The grade is  C\n The average for this subject is 3/5";
                              }
                            else if ((x>=65)&&(x<=69))
                               {
                                 t=2.5*n;
                                 cout<<"The grade is D+ \n The average for this subject is 2.5/5";
                                }
                               else if ((x>=60)&&(x<=64))
                                    {
                                     t=2*n;
                                     cout<<"The grade is D \n The average for this subject is 2/5";
                                     }
                                     else cout<<"you are fail";
     m+=t;
    v+=n;
 }

  cout<<"The average is :"<<m/v;
  getch();
}

 

توقيع زهرة البنفسج  

 

 

زهرة البنفسج غير متواجد حالياً   رد مع اقتباس