how

Sample Output:Enter 5Exam Scores:
Exam Score No. 1 => 91
Exam Score No. 1 => 75
Exam Score No.1 => 85
Exam Score No. 1 => 55
Exam Score No. 1 => 90

how can i code this part?
No. of Outstanding Scores : 2
No. of Satisfactory Scores : 2
No. of Unsatisfactory Scores : 1




i have this code now for the upper part
#include <stdio.h>
#include <conio.h>
int main()
{
int score[5],i;

printf("Enter 5 exam scores:\n");
for(i=0;i<5;i++)
{
printf("\tExam Score No. %d: ", i+1);
scanf("%d",&score[i]);
}
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <conio.h>

int main()
{
	int score[5], i;
	int outstand = 0, satis = 0;

	printf("Enter 5 exam scores:\n");

	for (i = 0; i < 5; i++)
	{
		printf("\tExam Score No. %d: ", i + 1);
		scanf("%d", &score[i]);

		if (score[i] >= 90) ++outstand;
		else if (score[i] >= 70) ++satis;
	}

	printf("No. of Outstanding Scores: %d\n", outstand);
	printf("No. of Satisfactory Scores: %d\n", satis);
	printf("No. of Unsatisfactory Scores: %d\n", 5 - (outstand + satis));
}


giving:


Enter 5 exam scores:
        Exam Score No. 1: 91
        Exam Score No. 2: 75
        Exam Score No. 3: 85
        Exam Score No. 4: 55
        Exam Score No. 5: 90
No. of Outstanding Scores: 2
No. of Satisfactory Scores: 2
No. of Unsatisfactory Scores: 1

it works! thankyou very much for your help!
Topic archived. No new replies allowed.