Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- float x;
- printf("Enter your grade:");
- scanf("%f",&x);
- if (x<=100 && x>=90)
- {
- printf("\nYou got A");
- }
- else if (x<=89.9 && x>=80)
- {
- printf("\nYou got B");
- }
- else if (x<=79.9 && x>=70)
- {
- printf("\nYou got C");
- }
- else if (x<=69.9 && x>=65)
- {
- printf("\nYou got D");
- }
- else
- {
- printf("\nYou got F");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement