Popular posts from this blog
Introduction-C programs
1] Program to find sum of two numbers. #include<stdio.h> #include<conio.h> void main() { int a,b,s; clrscr(); printf(“Enter two no: ”); scanf(“%d%d",&a,&b); s=a+b; printf(“sum=%d”,s); getch(); } Output: Enter two no: 5 6 sum=11 2] Program to find area and circumference of circle. #include<stdio.h> #include<conio.h> void main() { int r; float pi=3.14,area,ci; clrscr(); printf(“enter radius of circle: ”); scanf(“%d”,&r); area=pi*r*r; printf(“area of circle=%f ”,area); ci=2*pi*r; printf(“circumference=%f ”,ci); getch(); } Output: enter radius of a circle: 5 area of circle=78.000 circumference=31.4 3] Program to find the simple interest. #include<stdio.h> #include<conio.h> void main() { int p,r,t,si; clrscr(); printf(“enter principle, Rate of interest & time to find simple interest: ”); scanf(“%d%d%d”,&p,&r,...
Comments
Post a Comment