Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fix this code, C + + . # include using namespace std; / / pre - processing int main ( ) { / / Briayan
Fix this code, C# include
using namespace std;
pre processing
int main
Briayan Student, Programmer
Program that computes the area of a triangle
declare and initialize the variables
double area base height ;
Input request and receive variable values
cout
please enter the base ;
cin base;
cout
please enter the height ;
cin height;
object height null;
Process perform any required variable assignment
area base height;
Output display values to the program user
cout
A triangle with base base;
cout and height height;
cout
;
cout
has an area of area;
cout square units." endl endl;
cout "press Enter to close this window
;
systempause; Windows command
return ;
#include
using namespace std;
pre processing directives
int main
Program that computes the area of a trapezoiddouble area base base height ;
Also, modify your input statements to include both bases.
cout
please enter the base ;
cin base;
cout
please enter the base ;
cin base;
cout
please enter the height ;
cin height;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started