Write a program to display your name on screen.
#includ<stdio.h>
Int
main()
{
Clrscr():
Prntf(“MY NAME IS MICAHL FEDAR”);
getch();
Return(0);
}
Write a program to find out the area of circle.
Int main () Name of the
declaration.
{
Fioat
a,r; //variable declaration.
r=1.0;
//initialization.
a=3.14*r*r;
//calcualton.
|
Printf(“a=%f”,a);
getch();
return(0);
}
Write to find out the area of cylinder.
a=2rh
int
main()
{
Float a,r,h;
r=1.0;
h=1.0;
a=2*3.14*r*h;
print(“a=%f”,a);
getch();
return(0);
}
Write to find out volume of cylinder.
Int
main()
{
Flot r,h,v;
Print(“enter radius & height”)
Scanf(“%f%f”, & r & h);
V=3.14*r*r*h:
Printf(“volume=%f”,v);
Getch();
Return(0);
}
Write a program to take input in KG. Convert it into a Grams
Int
main()
{
Float
kg;
Int. ,
gram
Printf(“enter
weight in KG”);
Scantf(“%f”,&k);
g=1000*k;
printf(“weighting in gram =%d”,g);
getch();
return(0);
}
No comments:
Post a Comment