Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
859 B
2
Indexable
Never
/*
 ============================================================================
 Name        : first_code.c
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>

int main() {


	char grade;

	while(1){
	 printf("\n Please enter your grade:");
	grade=getch();

	switch(grade)
	{
	case 'A':
		printf("\nExellent remark !\n");
		break;
	case 'B':
		printf("your grade is B");
		break;
	case 'C':
		printf("\nwell done \n");
		break;
	case 'D':
		printf("\nYou passed \n");
		break;
	case 'F':
		printf("\nBetter try again \n");
		break;
	default:
		printf("\nInvalid grade you enterd");

	}



	}




	getch();

	return 0;
}