prev


Getting Input Values From Keyboard

11.Area of Triangle (24.6.2009)

/*
Program# 11
date : 10-12-2008
Area of Triangle
*/

#include <stdio.h>
main(){
float b,c,h;
printf("\nEnter value for Breadth and Height :");
scanf("%f %f",&b,&h);
c=1.0/2.0*b*h;
printf("Area is : %f\n",c);
}

output:
Enter value for Breadth and Height : 3.2 8.1
Area is : 12.9600001

next
blog comments powered by Disqus