Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

AVERAGE GRADE Write a program called AverageGrade to compute for the average grade of students. Steps to follow: 1. Your program should ask the user

image text in transcribed
AVERAGE GRADE Write a program called AverageGrade to compute for the average grade of students. Steps to follow: 1. Your program should ask the user to enter the number of students, reads it from the 2. Then ask the user for the grades of each of the students and saves them in an int array 3. Your program shall check that the grade is between 0 and 100. As long as it is between 0 keyboard, and saves it in an int variable called numStudents called grades. Use for loop statement to ask and accept the grade of each students. and 100 accept the input otherwise display "Invalid grade, try again" then ask the user to input another grade. 4. After all the grade has been inputted, your program should compute for the average grade of all students and displays it on the screen. Here is a sample run: Enter the number of students: 3 Enter the grade for student 1: 55 Enter the grade for student 2: 108 Invalid grade, try again... Enter the grade for student 2: 56 Enter the grade for student 3: 57 The average is: 56.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions