Exer2 5
Exer2 5
Filename: EXER2_5.c
*/
#include<math.h>
#include <stdio.h>
#include <stdlib.h>
void menu();
int main(){
int rep;
do{
system("cls");
menu();
scanf("%d", &rep);
}while(rep!=0);
return 0;
void menu(){
float balance;
printf("Main Menu\n");
scanf("%d", &choice);
switch(choice){
case 1:
scanf("%d", &score);
break;
case 2:
scanf("%d", &num1);
scanf("%d", &num2);
break;
case 3:
validate = ValidateChar(inputChar);
if(validate == 1){
}else{
break;
case 4:
scanf("%f", &balance);
printf("Enter the current interest rate charged by your credit card: ");
scanf("%d", &interest);
scanf("%d", &months);
break;
case 5:
scanf("%d", &n);
break;
default:
printf("Invalid Input!\n");
break;
}
int Grader(int score){
if(score>90){
return 'A';
}else if(score>80){
return 'B';
}else if(score>70){
return 'C';
}else{
return 'F';
int i , gcd;
for(i=1;i<=num1&&i<=num2;i++){
gcd = i;
return gcd;
float interestDue;
return interestDue;
}else{
return 0;
int i, fact = 1;
for (i=1;i<=n;i++){
fact *= i;
return fact;