Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Thursday, December 31, 2009

Write a program in 'C' to enter the base (b) and height (h) of a traingle and to calculate and print the area (a) where area = 1/2*base*height



#include<stdio.h>
main()
{
float b, h, a;
printf("Enter the value for base and height\n");
scanf("%f %f", &b, &h);
a = 0.5* b*h;
printf("The area is = %f\n", area);
return(0);
}

For eg :-

Output :-
Enter the value for base and height
5 8
The area is = 20.000000

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP