Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given int std1, std2, std3, std4, std5, avegrade;// avegrade is the average of the 5 grades std1 = 87; std2 = 90; std3 = 67;

Given

int std1, std2, std3, std4, std5, avegrade;// avegrade is the average of the 5 grades

std1 = 87;

std2 = 90;

std3 = 67;

std4 = 72;

std5 = 78; // as grades of five students

avegrade = 0;

Write a program to perform the following tasks.

I. declare and initialize std1, std2, std3, std4, std5, and avegrade as above.

II. compute the average grade of the five students and assign it to avegrade, and then display the

average grade on the screen.

III. Using if else statement:

If the avegrade is >= 80, display message A level on the screen.

If the avegrade is >= 60 and < 80, display message B level on the screen.

If the avegrade is < 60, display message C level on the screen.

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago