#include<stdio.h>
#include<conio.h>
void main()
{
int base,height;
float area;
clrscr(); // Function to clear the output screen
printf("Enter the base and height of the triangle : ");
scanf("%d %d",&base,&height);
area=0.5*base*height;
printf("The area of triangle with base %d and height %d is %f",base,height,area);
getch();
}
#include<conio.h>
void main()
{
int base,height;
float area;
clrscr(); // Function to clear the output screen
printf("Enter the base and height of the triangle : ");
scanf("%d %d",&base,&height);
area=0.5*base*height;
printf("The area of triangle with base %d and height %d is %f",base,height,area);
getch();
}
No comments:
Post a Comment