C
program for area of right angled triangle
Formula of
area of right angled triangle:
Area = (1/2) * height * width
C code:
#include<stdio.h>
int main(){
float h,w;
float area;
printf("Enter
height and width of the right angled triangle : ");
scanf("%f%f",&h,&w);
area
= 0.5 * h * w;
printf("Area of
right angled triangle is: %.3f",area);
return 0;
}
Sample
output:
Enter height and width of the right angled triangle: 10 5
Area of right angled triangle is: 25.000
7. Write a c program to find the area of rhombus.
8. Write a c program to find the area of parallelogram.
2 comments:
Usefull Programs
Find Average using do while statement.
Post a Comment