Q:

Write a program in c to find the division of student

-1

Write a program in c to find the division of student

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Algorithm:-

·        Start

·        input percentage

·        If per >100 invalid percentage

·         If Per >=60 Ist division

·         If per 50-60  2nd division

·         If Per  less than 40 fail

·        stop

Flowchart:

Programs:

#include<stdio.h>
#include<conio.h>
void main()
{
Int per;
Clrscr();
Printf(“Enter percentage of student”);
Scanf(“%d”,&per);
If(per>100)
{
Printf(“\n invalid percent”);
}
else if(per>=60)
{
Printf(“\n first division”);
}
else if(per<60&&per>=50) {
printf(“second division”);
}
else if(per<50&&per>=40) {
printf(“\m third division”);
}
else
{
Printf(“\n fail”);
}
getchI();
}

Output:-

Enter percentage of student : 60
First division

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming Exercises With Solutions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a program in c to find prime number or not... >>