Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (void)
- {
- int num;
- char buff[100];
- printf("input point : ");
- fgets(buff, sizeof(buff), stdin);
- sscanf(buff, "%d", &num);
- const char* hyoka = (num >= 90)
- ? "A+" :
- ((num >= 80) ? "A" :
- ((num >= 70) ? "B" :
- ((num >= 60) ? "C" : "D")));
- printf(hyoka);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment