Skip to main content

Posts

Showing posts with the label 12. Write a C program to enter base and height of a triangle and find its area.

ads1

12. Write a C program to enter base and height of a triangle and find its area.

12. Write a C program to enter base and height of a triangle and find its area. Solution :-  #include<stdio.h> #include<conio.h> void main() {     clrscr();     float base,height,area;     printf("Enter the base of a traingle :-");     scanf("%f",&base);     printf("Enter the height of a traingle:-");     scanf("%f",&height);     area = (base*height)/2;     printf("The area of a Traingle is :-%f",area); getch(); }   Output :-   

ads2