C Float Data Type
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
#include<stdio.h>
#include<conio.h>
int main()
{
system("cls");
float A,r,C;
const float PI=3.14;
printf("'\nEnter redious");
scanf("%f",&r);
A=PI*r*r;
C=2*PI*r;
printf("\nArea is %f",A);
printf("\nCircumfrance is %f",C);
return 0;
}
Program 2
// Mark sheet of Student
#include<stdio.h>
#include<conio.h>
int main()
{
int h,e,m,c,total;
float per;
system("cls");
printf("Enter marks of hindi");
scanf("%d",&h);
printf("Enter marks of english");
scanf("%d",&e);
printf("Enter marks of maths");
scanf("%d",&m);
printf("Enter marks of computer");
scanf("%d",&c);
total=h+e+m+c;
printf("\n Total Marks is: %d",total);
per=total/4.0;
printf("\nPercentage is %.2f:",per);
return 0;
}
We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

