Answer to Question #252974 in C++ for Imman

Question #252974

Problem #4

Var x;

               While (x <=5) {

                               Print ();

                               x = x + 1;

}


What is the answer?

1.      If x = 3

Answer =

2.      If x = 1

Answer = 


1
Expert's answer
2021-10-19T16:20:03-0400
#include<iostream>
using namespace std;
int main()
{
	int x;
	cout<<"Enter the value of x: ";
	cin>>x;
    while (x <=5) {
	cout<<x;
	x = x + 1;

}
}

1 if x=3

Answer=345

2 if x=1

Answer=12345



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