ملتقى الشفاء الإسلامي

ملتقى الشفاء الإسلامي (http://forum.ashefaa.com/index.php)
-   ملتقى البرامج والانترنات والجرافيكس (http://forum.ashefaa.com/forumdisplay.php?f=20)
-   -   مساعدة (c++) (http://forum.ashefaa.com/showthread.php?t=37121)

زهرة البنفسج 09-10-2007 01:44 PM

مساعدة (c++)
 
السلام عليكم ورحمة الله وبركاته
أنا الحين ماخذه مادة
" how to program ++C"
وعندي مسألة وأريد حلها فأريد مساعدة منكم ضروري:mad:
وهذا هو السؤال
Write the grades program using the following specifications:-


Write the grades program, which is concerned with determining the end of year rating for each student, given the exam marks that each student achieves. Each student has eight exam marks in the range 0 to 100. A mark >= 40 is considered a pass. To pass the year of study a student must have at least six individual pass marks and in addition the overall total must be >= 320 and the average must also be a passing mark of at least 40%. If a student does not meet these criteria, the student is given a FAIL rating. If a student does pass the year, the student is given a rating dependent on the overall total as following:

Total >= 560 EXCELLENT
Total >= 480 VERY GOOD
Total >= 400 GOOD
Total >= 320 SATISFACTORY
Total < 320 FAIL

Your output should have proper titles for the marks, number of passes, total, and rating, as shown below:



Example 1: input/output



Enter eight exam marks separated by a space
= = = = = = = = = = = = = = = = = = = = = =
81 82 83 84 85 86 87 88


Results of the student
= = = = = = = = = = = =
Exam Marks: 81, 82, 83, 84, 85, 86, 87, 88


Number of Passes = 8

Total Mark = 676


Rating = EXCELLENT

Example 2 input/output


Enter eight exam marks separated by a space
= = = = = = = = = = = = = = = = = = = = = = =
21 22 23 24 25 26 27 28


Results of the student
= = = = = = = = = = = =
Exam Marks: 21, 22, 23, 24, 25, 26, 27, 28


Number of Passes = 0

Total Mark = 196


Rating = FAIL

زهرة البنفسج 09-10-2007 05:31 PM

Please help me if you can.I will try to solve it but I need then to know the correct answer..
your sis;;;;

نورا* 10-10-2007 06:03 PM

شو هاد ؟؟ http://forum.ashefaa.com/images/icons/075.gif

بس رح اسأللك اختي لانها بتدرس هيك اشياء

الله يوفقك

زهرة البنفسج 22-10-2007 05:29 PM

شكرا جزيـــــــــــــــــــــــــــــــــــــــــــــــ ــــــــــــــــــــــــــــــــــــــــــــــــــ ــــــــــــــــــــــــــــــــــــلا"

maso 01-11-2007 01:44 PM

بسم الله الرحمن الرحيم
دا برنامج بيتنفذ علي 2 examples الموجودين عندنا
مجرد ما هندخلة اسماء المواد والدرجات وهو هيحسب كل شيئ
اتمني الافاده


# include <iostream.h>
Int main ( )
{
Int s1 ,s2 ,s3 , s4 , s5 , s6 , s7 , s8 ;
char sub1 , sub2 , sub3 , sub4 , sub5 , sub6 sub7 , sub8;
Char subject1 , subject2 , subject3 , subject4 , subject5 , subject6 , subject7 , subject8;
Int totalmark , raiting ;

تسجيل اسماء المواد

Cout << " Enter sub1 : " <<; ادخل اسم الماده الاولي//
Cin >> subject1>>endl;
Cout << " Enter sub2 : " <<; ادخل اسم الماده الثانية//
Cin >> subject2>>endl;
Cout << " Enter sub3 : " <<; // ادخل اسم الماده الثالثة
Cin >> subject3>>endl;
Cout << " Enter sub4 : " <<; //ادخل اسم الماده الرابعه
Cin >> subject4>>endl;
Cout << " Enter sub5 : " <<; ادخل اسم الماده الخامسة//
Cin >> subject5>>endl;
Cout << " Enter sub6 : " <<; // ادخل اسم الماده السادسة
Cin >> subject6>>endl;
Cout << " Enter sub7 : " <<; // ادخل اسم الماده السابعه
Cin >> subject7>>endl;
Cout << " Enter sub8 : " <<; ادخل اسم الماده الثامنه //
Cin >> subject8>>endl;

تسجيل درجات المواد

Cout << " Enter s1 : " <<; ادخل درجات الماده الاولي//
Cin >> s1>>endl;
Cout << " Enter s2 : " <<; ادخل درجات الماده الثانية//
Cin >> s2>>endl;
Cout << " Enter s3 : " <<; ادخل درجات الماده الثالثة//
Cin >> s3>>endl;
Cout << " Enter s4 : " <<; ادخل درجات الماده الرابعه//
Cin >> s4>>endl;
Cout << " Enter s5 : " <<; ادخل درجات الماده الخامسة//
Cin >> s5>>endl;
Cout << " Enter s6 : " <<; ادخل درجات الماده السادسة//
Cin >> s6>>endl;
Cout << " Enter s7 : " <<; ادخل درجات الماده السابعة//
Cin >> s7>>endl;
Cout << " Enter s8 : " <<; ادخل درجات الماده الثامنه//
Cin >> s8>>endl;

Totalmark = s1+s2+s3+s4+s5+s6+s7+s8 ; مجموع الدرجات //

If totalmark >=560 then
Rating = "excellent"
Else if totalmark >=480 then
Rating = "very good"
Else if totalmark >=400 then
Rating = "good"
Else if totalmark >=320 then
Rating = "satisfactory"
Else if Rating = "fail"
End if;

Cout << "rating=" << rating<<endl;
Cout << "totalmark :"<<totalmark<<endl;

If totalmark<= 40/100 then
Cout << "the student fail " << endl ;
Endif ;
Return 0 ;

}

maso 01-11-2007 01:45 PM

بسم الله الرحمن الرحيم
دا برنامج بيتنفذ علي 2 examples الموجودين عندنا
مجرد ما هندخلة اسماء المواد والدرجات وهو هيحسب كل شيئ
اتمني الافاده


# include <iostream.h>
Int main ( )
{
Int s1 ,s2 ,s3 , s4 , s5 , s6 , s7 , s8 ;
char sub1 , sub2 , sub3 , sub4 , sub5 , sub6 sub7 , sub8;
Char subject1 , subject2 , subject3 , subject4 , subject5 , subject6 , subject7 , subject8;
Int totalmark , raiting ;

تسجيل اسماء المواد

Cout << " Enter sub1 : " <<;
Cin >> subject1>>endl;
Cout << " Enter sub2 : " <<;
Cin >> subject2>>endl;
Cout << " Enter sub3 : " <<;
Cin >> subject3>>endl;
Cout << " Enter sub4 : " <<;
Cin >> subject4>>endl;
Cout << " Enter sub5 : " <<;
Cin >> subject5>>endl;
Cout << " Enter sub6 : " <<;
Cin >> subject6>>endl;
Cout << " Enter sub7 : " <<;
Cin >> subject7>>endl;
Cout << " Enter sub8 : " <<;
Cin >> subject8>>endl;

تسجيل درجات المواد

Cout << " Enter s1 : " <<;
Cin >> s1>>endl;
Cout << " Enter s2 : " <<;
Cin >> s2>>endl;
Cout << " Enter s3 : " <<;
Cin >> s3>>endl;
Cout << " Enter s4 : " <<;
Cin >> s4>>endl;
Cout << " Enter s5 : " <<;
Cin >> s5>>endl;
Cout << " Enter s6 : " <<;
Cin >> s6>>endl;
Cout << " Enter s7 : " <<;
Cin >> s7>>endl;
Cout << " Enter s8 : " <<;
Cin >> s8>>endl;

Totalmark = s1+s2+s3+s4+s5+s6+s7+s8 ;
مجموع الدرجات //

If totalmark >=560 then
Rating = "excellent"
Else if totalmark >=480 then
Rating = "very good"
Else if totalmark >=400 then
Rating = "good"
Else if totalmark >=320 then
Rating = "satisfactory"
Else if Rating = "fail"
End if;

Cout << "rating=" << rating<<endl;
Cout << "totalmark :"<<totalmark<<endl;

If totalmark<= 40/100 then
Cout << "the student fail " << endl ;
Endif ;
Return 0 ;

}

maso 01-11-2007 01:55 PM

خللي بالك من ; توضع في نهاية الجملة مش في البداية زي الرد ما مكتوب
هي كانت مكتوبة صح ولكن الكلمات ضاعت خالص

زهرة البنفسج 02-11-2007 10:17 PM

أشكرك أخي جدا على اهتمامك بالموضوع
جزاك الله ألف خيررررر...

Sci. Researcher 09-11-2007 01:04 AM

جزاكم الله خيرا


الساعة الآن : 05:48 AM

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd By AliMadkour


[حجم الصفحة الأصلي: 22.24 كيلو بايت... الحجم بعد الضغط 21.86 كيلو بايت... تم توفير 0.38 كيلو بايت...بمعدل (1.69%)]