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
|
switch(graderecord)
{
case '1' :
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
{
system("cls");
cout << "Enter quiz grade : ";
cin >> e.pq;
fwrite(&e,recsize,1,fp);
cout << "\n Add Another long quiz grade (Y/N) ";
fflush(stdin);
another = getchar();
}
break;
case '2' :
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
{
system("cls");
cout << "Enter long quiz grade : ";
cin >> e.plq;
fwrite(&e,recsize,1,fp);
cout << "\n Add Another long quiz grade (Y/N) ";
fflush(stdin);
another = getchar();
}
break;
case '3' :
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
{
system("cls");
cout << "Enter assignment grade : ";
cin >> e.pa;
fwrite(&e,recsize,1,fp);
cout << "\n Add Another quiz grade (Y/N) ";
fflush(stdin);
another = getchar();
}
break;
case '4' :
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
{
system("cls");
cout << "Enter project grade : ";
cin >> e.pp;
fwrite(&e,recsize,1,fp);
cout << "\n Add Another project grade (Y/N) ";
fflush(stdin);
another = getchar();
}
break;
case '5':
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
fseek(fp,0,SEEK_END);
{
system("cls");
cout << "Enter character grade : ";
cin >> e.pc;
fwrite(&e,recsize,1,fp);
cout << "\n Add Another character grade (Y/N) ";
fflush(stdin);
another = getchar();
}
break;
case '6' :
fseek(fp,0,SEEK_END);
{
system("cls");
cout << "Enter prelim grade : ";
cin >> e.pg;
}
break;
case '7':
{
start ();
}
return 0;
|