Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- float a;
- printf("enter your marks:");
- scanf("%f",&a);
- if(a>=80&&a<=100)
- {
- printf("CONGRATULATIONS! you got A+\n");
- printf("4.00\n");
- }
- if (a>=75&&a<=79)
- {
- printf("A\n");
- printf("3.75\n");
- }
- if (a>=70&&a<=74)
- {
- printf("A-\n");
- printf("3.50\n");
- }
- if (a>=65&&a<=69)
- {
- printf("B+\n");
- printf("3.25\n");
- }
- if (a>=60&&a<=64)
- {
- printf("B\n");
- printf("3.00\n");
- }
- if (a>=55&&a<=59)
- {
- printf("B-\n");
- printf("2.75\n");
- }
- if (a>=50&&a<=54)
- {
- printf("C+\n");
- printf("2.50\n");
- }
- if (a>=45&&a<=49)
- {
- printf("C\n");
- printf("2.25\n");
- }
- if (a>=40&&a<=44)
- {
- printf("D\n");
- printf("2.00\n");
- }
- if (a>=00&&a<=39)
- {
- printf("F\n");
- printf("0.00\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement