maths

Please help me am trying to write a code for a mathematical program that prompts users to enter height and base then find area but displays the answer in this format. With the stars
***
*height________*
*Base__________*
*area___________*
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;

int main ()
{
  int base,height, area;
  cout<<endl<<"enter height";
  cin>>height;
  cout<<endl<<"enter base";
  cin>>base;

cout<<endl<<"*enter height "<<height<<"*";
cout<<endl<<"*enter base   "<<base<<"*";
cout<<endl<<"*enter area   "<<0.5*height*base<<"*";

  return 0;
}
Topic archived. No new replies allowed.