#include <stdio.h>
void main()
{
int num,num1,num2, cal;
num=cal=0;
char grade1=cal=0,grade2=cal=0;
printf("\n Enter the number of subjects taken in Spring Semester:");
scanf("%d", &num);
fflush(stdin);//
if(grade1==4){
printf("\n\nEnter the Math Grade(A,B,C): %c",grade1);
do{
printf("\ngrade1=");
scanf("%d",&cal);
}
else if(
printf("\nError!\n\n");
}while(1);
printf("\nEnter the Math Credit hours(1~3):");
num1 = getchar();
grade1=4;
}
else if(grade2==3){
grade2=3;
}
printf("\nEnter the Math Grade(A,B,C):\n");
scanf("%c",&grade1);
printf("Enter the Physics Grade(A,B,C):");
grade2 = getchar();
printf("\nEnter the Physics Credit hours(1~3):");
num2 = getchar();
printf("\nMath Credit hours: %d",num1);
printf("\nPhysics Grade: %c",grade2);
printf("\nPhysics Credit hours:%d\n",num2);
printf("\n <Math Credit hours> \n");
do{
printf("\n 1 + 1 = ");
scanf("%d", &cal);
}while(cal != 3);
printf("\n Error!\n\n");
}
printf("\n <Physics Credit hours> \n");
do{
printf("\n 4 - 1 = ");
scanf("%d", &cal);
}while(cal != 3);
printf("\n Error!\n");
}
printf("\n The End.\n");
system("pause");
}
You can't, you have to come up with variables to calculate grades
printf ("x")
The A Plus Program is an initiative, not a test. So no, there is no answer book.
Terminate and Stay Resident (TSR) programs are a DOS concept, not a Windows concept.
if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;
Yes
time in hours second minute
You can't, you have to come up with variables to calculate grades
cn = c0 *( 1 + i ) pow n
To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;
printf ("x")
i dn't know. haha
For example: int main (void) { return 0; }
It depends on what program you design really
Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.
Exit the program and relaunch it.
It is unfortunate the way American schools and their academic success is going these days. And, it is very sad to also say that among 4th grade pupils only 36 percent were successful using the Reading Plus program.