#include <iostream> using namespace std; int main() { float base, height, area; base=10.3 height=13.56; area=1/2*base*height; cout<<"The area of a right triangle with base 10.3″<<base<<"and height 13.56″<<height<<"is"<<area<<endl; system("pause"); return 0; }
1/2
area = 0.5 * base * height; area = (base * height) / 2; area = (1.0 / 2) * base * height;
area=1/2*base*height;
area=1/2.0*base*height;
cout<<"The area of a right triangle with base "<< base <<" and height ″<< height << " is " << area << endl;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)