The aim of the code is to calculate the percentage of the student mark until the student enters N (when asked if there are anymore marks to calculate).
#include <stdio.h>
#include <string.h>
main()
{
int mark, pmark;
char reply;
reply = 'Y';
while (reply != 'N')
{
printf("What is your mark out of ten? \n");
scanf("%d", &mark);
pmark = mark * 10;
printf("Your percentage mark is %d\n", pmark);
printf("Any more marks to calculate? \n");
scanf("%c", &reply);
}
system ("pause");
return 1;
}
but instead it just loops and keeps asking for the student's mark.
Anyone able to help?
Thanks silas.