PLEASE WRITE THE OUTPUT FOR THE FOLLOWING 1. Output for( p=2; p<=10; p += 2) cou
ID: 3923600 • Letter: P
Question
PLEASE WRITE THE OUTPUT FOR THE FOLLOWING
1.
Output
for( p=2; p<=10; p += 2)
cout<< “p is now: ” << p << endl;
2.
int total =50; Output
for ( i = 1; i <= 10; i += 2)
cout << i << endl;
3.
int total =0; Output
while(total<10) {
cout <<” Hello” << endl;
total++;
}
Explanation / Answer
Question 1:
Answer:
p is now: 2 p is now: 4 p is now: 6 p is now: 8 p is now: 10
Question 2:
Answer:
1
3
5
7
9
Question 3:
Answer:
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.