GeekInterview.com
Series: Subject: Topic:
Question: 30 of 587

C program using loop and array

Write a C program using arrays and any loop statements that asks the user to enter the number of students. For each student, enter the number of courses. The user should enter the students ID number and the marks for each course. Compute and display the total and average of the students marks.

Sample Output:
Enter the number of students: 2
Enter Student ID no. 1: 082367
Enter the number of courses: 2
Enter the mark for course 1: 80
Enter the mark for course 2: 80
Total marks = 160
Average = 80

Enter Student ID No. 2: 12345
Enter the number of courses: 3
Enter mark for course 1 : 80
Enter mark for course 2 : 90
Enter mark for course 3 : 85
Total Marks = 255
Average = 85
Asked by: Mohammed Mahmood Almahdi | Member Since Dec-2011 | Asked on: Dec 7th, 2011

View all questions by Mohammed Mahmood Almahdi

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.