Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
43 views2 pages

C++ Grade Selector Program

The program uses an array to store 10 student grades entered by the user. It then prints out the grades in different ranges: 90-100, 80-89, 75-79, and any failing grades below 75. The grades that fall within each range are outputted one by one.

Uploaded by

kantgaurav
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

C++ Grade Selector Program

The program uses an array to store 10 student grades entered by the user. It then prints out the grades in different ranges: 90-100, 80-89, 75-79, and any failing grades below 75. The grades that fall within each range are outputted one by one.

Uploaded by

kantgaurav
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Grade selector program in cpp

using array.....?
#include <iostream>
using namespace std;
main() {
int array[10];
int *p;
p = array;
cout << "\t Grade Selector 1.0";
cout << "\n\n";
for (int a=0; a<10; a++)
{
cout << "\nEnter Grade No. " << a+1 << ":";
cin >> p[a];
}
cout << "\n\n";
cout << "\nGrade 90 To 100";
cout << "\n";
for (int a=0; a<10; a++)
{
if (p[a] >= 90 && p[a] <=100) {
cout << "\n" <<p[a];
}
}
cout << "\n\n";
cout << "\nGrade 80 To 89";
cout << "\n";
for (int a=0; a<10; a++)
{
if (p[a] >= 80 && p[a] <=89) {
cout << "\n" <<p[a];
}
}
cout << "\n\n";
cout << "\nGrade 75 To 79";
cout << "\n";
for (int a=0; a<10; a++)
{
if (p[a] >= 75 && p[a] <=79) {
cout << "\n" <<p[a];
}
}
cout << "\n\n";
cout << "\nList of Failing Grades";

by

cout << "\n";


for (int a=0; a<10; a++)
{
if (p[a] < 75) {
cout << "\n" <<p[a];
}
}
cout << "\n\n";
system("pause");
}

You might also like