Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void){
  4. //
  5. // declare and intialize working storage
  6. //
  7. int marks;
  8.  
  9. //
  10. //prompt for grade
  11. //
  12. printf("Enter your marks :");
  13. scanf("&d", &marks);
  14.  
  15. if(marks <= 100 && marks >=90){
  16. printf("You got an A");
  17. }
  18. else if(marks <= 89 && marks >=80){
  19. printf("You got a B");
  20. }
  21. else if(marks <= 79 && marks >=70){
  22. printf("You got a C");
  23. }
  24. else if(marks <= 69 && marks >= 50){
  25. printf("You got a D");
  26. }
  27. else{
  28. printf("error");
  29. }
  30.  
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement