google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 write a c program to find grade of a student using function - 2nd puc computer science

write a c program to find grade of a student using function

write a c program to find grade of a student using function

#include<stdio.h>

#include<conio.h>

void main()

{

int s1,s2,s3;

void grade(int,int,int);

clrscr();

printf("Enter three subjects marks:\n");

scanf("%d%d%d",&s1,&s2,&s3);

grade(s1,s2,s3);

getch();

}

void grade(int s1,int s2,int s3)

{

float percentage;

percentage=(s1+s2+s3)/3.0;

printf("Percentage=%f\n",percentage);

if(percentage>=85.0&&percentage<=100.0)

printf("Distinction");

else

if(percentage>=60.0)

printf("First class");

else

if(percentage>=50.0)

printf("Second class");

else

if(percentage>=35.0)

printf("Pass class");

else

printf("Fail");

}

write a c program to find grade of a student using function write a c program to find grade of a student using function Reviewed by Vision Academy on January 06, 2022 Rating: 5

No comments:

CheckOut

Powered by Blogger.