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.


Expert's answer

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

LATEST TUTORIALS
APPROVED BY CLIENTS