-
Language
C
-
Description
Create a pseudocode based on the calculation on Student grades restricted to below conditions
- The user must input the Marks based on each Of Assessment: Q1, Q2, Q3, Project 1, Project 2, Assignment 1, Assignment 2, Midterm, Final.
- The Distribution Percentage of each Type of Assessment are listed below. Calculate the total Marks based on the input marks for each assessment.
| Assessment | Percentage (%) |
| Quiz (Q1 to Q3) | 9 |
| Project (Project 1 and Project 2) | 30 |
| Assignment (Assignment 1 and Assignment 2) | 16 |
| Midterm | 15 |
| Final | 30 |
- Below is the Grade based on Marks. Output the Grade based on the calculated marks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
float Assignment_1, Assignment_2, Final, Marks, Midterm;
float Point, Project_1, Project_2, Q1, Q2;
float Q3;
printf ("Enter the value of Assignment 1: ");
scanf ("%f", &Assignment_1);
(void) getchar ();
printf ("Enter the value of Assignment 2: ");
scanf ("%f", &Assignment_2);
(void) getchar ();
printf ("Enter the value of Final: ");
scanf ("%f", &Final);
(void) getchar ();
printf ("Enter the value of Midterm: ");
scanf ("%f", &Midterm);
(void) getchar ();
printf ("Enter the value of Project 1: ");
scanf ("%f", &Project_1);
(void) getchar ();
printf ("Enter the value of Project 2: ");
scanf ("%f", &Project_2);
(void) getchar ();
printf ("Enter the value of Q1: ");
scanf ("%f", &Q1);
(void) getchar ();
printf ("Enter the value of Q2: ");
scanf ("%f", &Q2);
(void) getchar ();
printf ("Enter the value of Q3: ");
scanf ("%f", &Q3);
(void) getchar ();
Marks=(Q1+Q2+Q3)*0.09/3+(Project_1+Project_2)*0.3/2+(Assignment_1+Assignment_2)*0.16/2+Midterm*0.15+Final*0.3;
Point=0;
if(Marks>=90&&Marks<=100)
{
printf ("Grade: A+\n");
Point=4;
}
if(Marks>=80&&Marks<90)
{
printf ("Grade: A\n");
Point=4;
}
if(Marks>=75&&Marks<80)
{
printf ("Grade: A-\n");
Point=3.67;
}
if(Marks>=70&&Marks<75)
{
printf ("Grade: B+\n");
Point=3.33;
}
if(Marks>=65&&Marks<70)
{
printf ("Grade: B\n");
Point=3;
}
if(Marks>=60&&Marks<65)
{
printf ("Grade: B-\n");
Point=2.67;
}
if(Marks>=55&&Marks<60)
{
printf ("Grade: C+\n");
Point=2.33;
}
if(Marks>=50&&Marks<55)
{
printf ("Grade: C\n");
Point=2;
}
if(Marks>=45&&Marks<50)
{
printf ("Grade: C-\n");
Point=1.67;
}
if(Marks>=40&&Marks<45)
{
printf ("Grade: D+\n");
Point=1.33;
}
if(Marks>=35&&Marks<40)
{
printf ("Grade: D\n");
Point=1;
}
if(Marks>=30&&Marks<35)
{
printf ("Grade: D-\n");
Point=0.37;
}
if(Marks<30)
printf ("Grade: E\n");
printf ("Value of Marks: %g\n", Marks);
printf ("Value of Point: %g\n", Point);
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}
#include <stdlib.h>
int main (void)
{
float Assignment_1, Assignment_2, Final, Marks, Midterm;
float Point, Project_1, Project_2, Q1, Q2;
float Q3;
printf ("Enter the value of Assignment 1: ");
scanf ("%f", &Assignment_1);
(void) getchar ();
printf ("Enter the value of Assignment 2: ");
scanf ("%f", &Assignment_2);
(void) getchar ();
printf ("Enter the value of Final: ");
scanf ("%f", &Final);
(void) getchar ();
printf ("Enter the value of Midterm: ");
scanf ("%f", &Midterm);
(void) getchar ();
printf ("Enter the value of Project 1: ");
scanf ("%f", &Project_1);
(void) getchar ();
printf ("Enter the value of Project 2: ");
scanf ("%f", &Project_2);
(void) getchar ();
printf ("Enter the value of Q1: ");
scanf ("%f", &Q1);
(void) getchar ();
printf ("Enter the value of Q2: ");
scanf ("%f", &Q2);
(void) getchar ();
printf ("Enter the value of Q3: ");
scanf ("%f", &Q3);
(void) getchar ();
Marks=(Q1+Q2+Q3)*0.09/3+(Project_1+Project_2)*0.3/2+(Assignment_1+Assignment_2)*0.16/2+Midterm*0.15+Final*0.3;
Point=0;
if(Marks>=90&&Marks<=100)
{
printf ("Grade: A+\n");
Point=4;
}
if(Marks>=80&&Marks<90)
{
printf ("Grade: A\n");
Point=4;
}
if(Marks>=75&&Marks<80)
{
printf ("Grade: A-\n");
Point=3.67;
}
if(Marks>=70&&Marks<75)
{
printf ("Grade: B+\n");
Point=3.33;
}
if(Marks>=65&&Marks<70)
{
printf ("Grade: B\n");
Point=3;
}
if(Marks>=60&&Marks<65)
{
printf ("Grade: B-\n");
Point=2.67;
}
if(Marks>=55&&Marks<60)
{
printf ("Grade: C+\n");
Point=2.33;
}
if(Marks>=50&&Marks<55)
{
printf ("Grade: C\n");
Point=2;
}
if(Marks>=45&&Marks<50)
{
printf ("Grade: C-\n");
Point=1.67;
}
if(Marks>=40&&Marks<45)
{
printf ("Grade: D+\n");
Point=1.33;
}
if(Marks>=35&&Marks<40)
{
printf ("Grade: D\n");
Point=1;
}
if(Marks>=30&&Marks<35)
{
printf ("Grade: D-\n");
Point=0.37;
}
if(Marks<30)
printf ("Grade: E\n");
printf ("Value of Marks: %g\n", Marks);
printf ("Value of Point: %g\n", Point);
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}