Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program to input marks and print remarks.
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int number_1, number_2, number_3;
- float avg;
- clrscr();
- printf("Enter marks of three subjects: ");
- scanf("%d%d%d", &number_1, &number_2, &number_3);
- avg = (number_1 + number_2 + number_3) / 3;
- if(avg > 90)
- printf("Excellent! :D");
- else if(avg > 70)
- printf("Good! :) ");
- else if(avg > 50)
- printf("Satisfactory. :/ ");
- else if(avg > 32)
- printf("Just pass... -_-");
- else
- printf("Fail. XD");
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment