Question

in C++ plaese: Write double loops that outputs the following: (a) start oxxxxxxx end start ooxxxxxx...

in C++ plaese:

Write double loops that outputs the following:
(a)
start oxxxxxxx end
start ooxxxxxx end
start oooxxxxx end
start ooooxxxx end
start oooooxxx end
(b)
start 10 5, 10 4, 10 3, 10 2, 10 1, end
start 12 5, 12 4, 12 3, 12 2, 12 1, end
start 14 5, 14 4, 14 3, 14 2, 14 1, end
start 16 5, 16 4, 16 3, 16 2, 16 1, end
start 18 5, 18 4, 18 3, 18 2, 18 1, end

thank you
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>

using namespace std;

int main() {
for(int i=0; i<5; i++)
{
cout << "start ";
  
for(int j=0; j<i+1; j++)
cout << "o";
for(int j=i+1; j<8; j++)
cout << "x";
  
cout << " end" << endl;
}
}

#include <iostream>

using namespace std;

int main() {
for(int i=10; i<20; i+=2)
{
cout << "start ";
  
for(int j=5; j>=1; j--)
cout << i << " " << j << ", ";
  
cout << "end" << endl;
}
}

// Hit the thumbs up if you are fine with the answer. Happy Learning!

Add a comment
Know the answer?
Add Answer to:
in C++ plaese: Write double loops that outputs the following: (a) start oxxxxxxx end start ooxxxxxx...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT