Hi everyone.
My assignment this time requires me to:
1. List down the marks obtained for each 5 Quizzes.
2. Choose the best 2 highest marks out of the 5 Quizzes.
3. To make the "best 2 highest marks" becomes the ultimate Quizzes total mark which has a 10% carrying mark as part of the Coursework mark for the subject.
So my solution answer is down here:
#include <stdio.h>
main()
{
int mark 1, mark 2, mark 3, mark 4, mark 5, The best 2 highest marks;
printf("Enter your Quiz 1 mark:");
scanf("%d", & mark 1);
printf("Enter your Quiz 2 mark:");
scanf("%d", & mark 2);
printf("Enter your Quiz 3 mark:");
scanf("%d", & mark 3);
printf("Enter your Quiz 4 mark:");
scanf("%d", & mark 4);
printf("Enter your Quiz 5 mark:");
scanf("%d", & mark 5);
The best 2 highest marks = mark > 50 + mark > 50
if ( mark > 50 ){
printf (" mark > 50 ");
else {
printf (" the mark is not one of the best 2 highest marks ");
}
return 0;
}
Can anyone tell me if I've done this right, or wrong? Please and thanks in advance (^_^)