Hello There, Guest! Login Register
Advertise Here | Remove Ads

Grade point & Grade letter checker C Program (BD)

  • 0 Vote(s) - 0 Average


10-29-2016, 08:13 PM #1
RabidHasan Offline MODERATOR MODERATORS
Posts:314 Threads:267 Joined:Dec 2015 Reputation: 1 Sex Male
Country: Bangladesh
Code:
#include<stdio.h>
#include<conio.h>
int main ()
{
int marks;
printf("Input marks that obtained: ");
scanf("%d", &marks);
if(marks > 100 || marks < 0)
printf("Invalid number");
else if(marks>= 0 && marks <= 39)
printf("Grade Letter= F\nGrade Point= 0.00\n\n");
else if(marks>= 40 && marks <= 44)
printf("Grade Letter= D\nGrade Point= 2.00\n\n");
else if(marks>= 45 && marks <= 49)
printf("Grade Letter= C\nGrade Point= 2.25\n\n");
else if(marks>= 50 && marks <= 54)
printf("Grade Letter= C+\nGrade Point= 2.50\n\n");
else if(marks>= 55 && marks <= 59)
printf("Grade Letter= B-\nGrade Point= 2.75\n\n");
else if(marks>= 60 && marks <= 64)
printf("Grade Letter= B\nGrade Point= 3.00\n\n");
else if(marks>= 65 && marks <= 69)
printf("Grade Letter= B+\nGrade Point= 3.25\n\n");
else if(marks>= 70 && marks <= 74)
printf("Grade Letter= A-\nGrade Point= 3.50\n\n");
else if(marks>= 75 && marks <= 79)
printf("Grade Letter= A\nGrade Point= 3.75\n\n");
else if(marks>= 80 && marks <= 100)
printf("Grade Letter= A+\nGrade Point= 0.00\n\n");
getch ();
return 0;
}






Forum Jump:


Users browsing this thread:1 Guest(s)

Advertise Here | Remove Ads