January 2, 2021June 9, 2025 Md. Anisur Rahman C Programming Lab Manual C Programming Lab Manual – 7 Write a C program to calculate the area of triangle. ALgorithm Function Main Declare Real base Declare Real height Declare Real Area Output "Enter base: " Input base Output "Enter height:" Input height Output "The area of the triangle is " Output (base * height) / 2 End Flow Chart C Programming code #include <stdio.h> int main() { double base; double height; double area; printf("Enter base: "); scanf("%lf", &base); printf("Enter height:"); scanf("%lf", &height); printf("The area of the triangle is "); printf("%lf", base * height / 2 ); return 0; } output Enter base: 10.50 Enter height: 10.50 The area of the triangle is: 55.125000 Share this: Click to share on X (Opens in new window) X Click to share on Facebook (Opens in new window) Facebook Click to print (Opens in new window) Print Click to email a link to a friend (Opens in new window) Email Click to share on LinkedIn (Opens in new window) LinkedIn Click to share on Reddit (Opens in new window) Reddit Click to share on Tumblr (Opens in new window) Tumblr Click to share on Pinterest (Opens in new window) Pinterest Click to share on Pocket (Opens in new window) Pocket Click to share on Telegram (Opens in new window) Telegram Click to share on WhatsApp (Opens in new window) WhatsApp Like Loading...