- 1

write a function that can calculate area of a triangle

27th Jun 2016, 10:45 AM
Amritpal
3 ответов
0
you are asking one question twice ...
27th Jun 2016, 11:00 AM
Mukul Kumar
Mukul Kumar - avatar
0
Void area( ) { int area,b,h; cout<<"enter the length of the base of the triangle"; cin>>b; cout<<"enter the length of the height of the triangle"; cin>>h; area=0.5*b*h; cout<<"area of triangle"<<area; }
27th Jun 2016, 11:07 AM
DEATH WALKER
DEATH WALKER - avatar
0
@yash anand....there is one problem...take float instead of int if you wanna use 0.5
27th Jun 2016, 11:10 AM
Mukul Kumar
Mukul Kumar - avatar