Answer to Question #322520 in C++ for Silan

Question #322520

What are the output of the program given below?



Program 1


#include <iostream>


using namespace std;


int main(){


int width = 10;


int height = 15;


double wide;


cout<<"PROGRAMME TO CALCULATE WIDE FOR TRIANGLE\n";


cout<<"##############################\n";


wide=0.5*height*width;


cout<<"\nWIDE: "<<wide<<"\n";


cout<<"\n##############################################\n";


return 0;


}



Program 2


#include <iostream>


using namespace std;


int main()


{


int x = 180, y = 200;


y = ++x;


cout << " x : " << x << endl << " y : " << y << endl;


}

1
Expert's answer
2022-04-02T09:59:21-0400

Program 1 will output:

PROGRAMME TO CALCULATE WIDE FOR TRIANGLE

##############################


WIDE: 75


##############################################


Program 2 will output:

 x : 181

 y : 181







Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS