Advertisement
sahajjain01

06.Input base and height and calculate area of triangle.

Aug 16th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. //Program to input base and height and calculate area of triangle.
  2. #include<stdio.h>
  3. #include<conio.h>
  4.  
  5. void main()
  6. {
  7.     float base, height;
  8.  
  9.     clrscr();
  10.  
  11.     printf("Enter base and height of the triangle: ");
  12.     scanf("%f%f", &base, &height);
  13.     printf("The area of triangle of base %f and height %f is: %f", base, height, 0.5 * base * height);
  14.  
  15.     getch();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement