Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- float cgpa;
- char status[30] ;
- printf("Enter your cgpa: ");
- scanf("%f",&cgpa);
- if(cgpa > 3.00){
- strcpy(status,"Second Class Upper");
- if(cgpa > 3.75){
- strcpy(status,"First Class Degree");
- }
- }
- else{
- if(cgpa > 2.00){
- strcpy(status, "Second Class Lower");
- }
- else{
- strcpy(status,"Yet to complete");
- }
- }
- printf("%s",status);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement