Posts

Showing posts from November, 2017

write a c program to find simple interest

Image
                                            c-program                          write a c program to find simple interest  #include<stdio.h> #include<conio.h> void main() { float P,R,T,SI; clrscr(); printf("enter the values of principal,rate of interest,time(in years)"); scanf("%f%f%f",&P,&R,&T); SI=0.01*P*R*T; printf("simple interest = %f",SI); getch(); }                                                          output        precautions :-  you take care about semi colon (terminators ) if you are using float data base than keep in mind with float we use %f at last don't forget to wr...

write a c program to find area of triangle when base and height is given

Image
                                              C-PROGRAM                                          TO FIND AREA OF TRIANGLE         #include<stdio.h> #include<conio.h> void main() { float base,height,area; clrscr(); printf("enter the base , height of triangle\n); scanf("%f%f",&base&heigtht); area= 0.5*base*height; printf("the area of triangle is %f",area); getch(); }           

write a c program to calculate area of circle

Image
                                      c-programming                 area of circle if radius is given  if radius is given : the output is attached with this file at the bottom of the page :-

write a c program to add two numbers

                          c- program                                                              write a C- program to add two numbers  #include<stdio.h> #include<conio.h> void main() { int a,b,sum; clrscr(); printf("enter the two numbers "); scanf("%d\n%d\n",&a&b); sum= a+b; printf("the sum of the given number is =%d",sum); getch(); }                          output         the output is  enter the two numbers  2 3 the sum of the given numbers is = 5