You are on page 1of 1

#

include iostream>
#
include string>
using
namespace std;
class
rec
private
float
base;
float
height;
public
void
set_ base ()
cout
insert the base : "
cin
base;}
void
set_ heghte ()
cout
insert the height : "
cin
height;}
void
get_ area ()
cout
the area is : "
cout
0.5 base* height endl
}
s;
void
main() {
s.
set_ base
s.
set_ heghte
s.
get_ area

You might also like