Answer to Question #182992 in C++ for Vincenzo Santoro

Question #182992

Write a program that produces the following output:

CCCCCCCCC       ++              ++
CC              ++              ++
CC        ++++++++++++++  +++++++++++++++
CC        ++++++++++++++  +++++++++++++++
CC              ++              ++
CCCCCCCCC       ++              ++

Note: The letter C in the output must be uppercase.


1
Expert's answer
2021-04-19T19:10:03-0400
#include <iostream>
#include<iomanip>
using namespace std;


int main()
{
  cout << "CCCCCCCCCC" << setw(15) << "++" << setw(20) << "++" << endl;
  cout << "CC" << setw(23) << "++" << setw(20) << "++" << endl;
  cout << "CC" << setw(30) << "++++++++++++++" << setw(20) << "++++++++++++++" << endl;
  cout << "CC" << setw(30) << "++++++++++++++" << setw(20) << "++++++++++++++" << endl;
  cout << "CC" << setw(23) << "++" << setw(20) << "++" << endl;
  cout << "CCCCCCCCCC" << setw(15) << "++" << setw(20) << "++" << endl;
  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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS