All the interfaces are done. Now I had to combine all these in 1 file as all were being executed separately, now all had to be executed from one main file. So all had to be executed from one file and one main function so what I did was I put them in one switch statement and made cases for all.
#include <stdio.h> int main () { /* local variable definition */ char grade = 'B'; switch(grade) { case 'A' : printf("Excellent!\n" ); break; case 'B' : case 'C' : printf("Well done\n" ); break; case 'D' : printf("You passed\n" ); break; case 'F' : printf("Better try again\n" ); break; default : printf("Invalid grade\n" ); } printf("Your grade is %c\n", grade ); return 0; }
No comments:
Post a Comment