Question 7: [15] In a class of 'n' number of students, the number of girls is 'm'. Write a program to input the values of n and m. Find and display the percentage of boys and girls in the class. Question 8. [151
Answers
Answered by
0
Answer:
void main()
{
int m,n;
float pb,pg;
printf(" Enter no of boys and girls");
scanf ("%d%d", &n,&m);
pb =( (float)n/(m+n))* 100;
pg =( (float)m/(m+n))* 100;
printf("\n percentage of boys = %f and girls = %f", pb,pg);
}
Similar questions