Hi,
Im trying to get this program to run - it complies but it crashes in DOS. It is down to the Stuname i think, or maybe having two print F's. Hope you can help.
Jon
Code:
#include <stdio.h>
main()
{
int stuname, mathsmark, englishmark, overallgrade;
/*get marks */
printf("What is your name\n");
scanf("%s", stuname);
printf("Please key in your maths mark\n");
scanf("%d", &mathsmark);
printf("Please key in your english mark\n");
scanf("%d", &englishmark);
/*Calculate total mark*/
overallgrade = mathsmark + englishmark;
/*display total mark*/
printf("your total mark", stuname);
printf("is %d", overallgrade);
return 0;
}