63 074
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #53182 in C++ for Mohdhaneef

Question #53182
Write a program that generates the following outputs :
5
10
9
Assign value 5 to a variable using= multiply it with 2 to generate 10 and subtract 1 to generate 9
Expert's answer
#include iostream;
using namespace std;
int main() {
int a = 5;
cout<<a;
a *= 2;
cout<<a;
a-=1;
cout<<a;
return 0;
}

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions