hi
how are you ?
i have project in loop but i dont know how to solve it ?
Write a C program to read results of class of 20 students. Each student has 4 results, distributed as follow:
• Test 1 25 %
• Test 2 25 %
• Test 3 25 %
• Final 50 %
can you help me ,plz?
june 200090 0 Newbie Poster
Recommended Answers
Jump to PostTest 1 25 %
Test 2 25 %
Test 3 25 %
Final 50 %adds up to 125%. I think one of your numbers is off.
Jump to PostI see it says if the number entered for the student is less than 20, it will print out what I assume is data on this fictional student regarding test info, and other stuff.
If you are supposed to simulate 20 individual students however, wouldn't it be better to …
Jump to PostArray of doubles,
4 subjects and 20 students so total number of elements will be 80..double Marks[80];
And for scanning use another loop inside while
while(student_num < 20) { for(int i=0; i<4; i++) { // Scan "students_num"th students "i"th marks .. } }
All 10 Replies
vinitmittal2008 37 Junior Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
june 200090 0 Newbie Poster
june 200090 0 Newbie Poster
vinitmittal2008 37 Junior Poster
Kamatari 1 Light Poster
Shankye 36 Junior Poster
june 200090 0 Newbie Poster
Shankye 36 Junior Poster
june 200090 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.