OK ... aparently I cant figure out how to write a while loop .. here is the code and I am using dev C++ the code asks for for the student name and just keeps asking... were can I find good information on how to write this part corectly.
Code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char studnam [30];
int bye = 0;
int prtrep = 0;
int score = 0;
char grade [1];
int average = 0;
while (studnam != "bye")
printf("Please enter the first and last name of the student.\n");
scanf("%s",&studnam);
printf("Please enter test score 1 for student %s.\n",studnam);
scanf("%d",&score);
printf("Please enter test score 2 for student %s\n",studnam);
{
if (average <= 59);
printf("grade is 'F'\n.");
if (average >= 60 <= 69);
printf ("grade is 'D'.\n");
if (average <= 70 >= 79)
printf("grade is 'C'.\n");
if (average <= 80 <= 89)
printf("grade is 'B'.\n");
if (average <= 90 <= 100)
printf("grade is 'A'\n");
}
printf("Would you like to print the entered informaion?");
scanf("%d", prtrep);
printf("1: Print Report");
printf("2: Exit Program");
{
if (prtrep == 2);
printf("than print file grades record");
if (prtrep == 1);
printf("Hit enter to exit program now.");
}
system("PAUSE");
return 0;
}