C Program Tutorial Class- 04
Dear friends, in the video that I am sharing with you today, I have shown you how to run a program and get the result from its input, but the program that I have shared today is a C program to find the area of a triangle. Finding the area by taking the values of two sides of a triangle and we know that the area can be found by taking the values of three sides of a triangle, I will share that with you in the next video, but today I have shared how to find the area by taking the values of two sides of a triangle, I have shared that through this video.
#include<stdio.h>
int main()
{
float b, h, area;
printf("Enter Base and Height:");
scanf("%f %f", &b, &h);
area =0.5bh;
printf("Area is: %.2f", area);
return 0;
}
I hope you have understood the program by watching my video and I have written the C program in this post so that it is easy for you to understand and there are no mistakes and you can run it if you wish. Thank you very much to everyone. Have a good day.
Posted with Speem
