Advertisement
biswasrohit20

l

Apr 27th, 2021
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5.  
  6. int main()
  7. {
  8. float cgpa;
  9. char status[30] ;
  10.  
  11. printf("Enter your cgpa: ");
  12. scanf("%f",&cgpa);
  13. if(cgpa > 3.00){
  14.  
  15. strcpy(status,"Second Class Upper");
  16. if(cgpa > 3.75){
  17.  
  18. strcpy(status,"First Class Degree");
  19. }
  20. }
  21. else{
  22. if(cgpa > 2.00){
  23.  
  24. strcpy(status, "Second Class Lower");
  25. }
  26. else{
  27.  
  28. strcpy(status,"Yet to complete");
  29. }
  30. }
  31.  
  32. printf("%s",status);
  33.  
  34. return 0;
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement