Seudónimo Seudónimo
  • 03-11-2018
  • Computers and Technology
contestada

Can someone please help me in answering this!?!
The language is C++

Can someone please help me in answering this The language is C class=

Respuesta :

tonb
tonb tonb
  • 03-11-2018

Here is a somewhat cryptic solution that works:

#include <algorithm>

#include <cstdlib>

using namespace std;

void q(char c, int count)

{

for (int i = 0; i < count; i++) {

 putchar(c);

}

}

void p(int b1, int plusses)

{

q(' ', b1);

q('+', plusses);

}

int main()

{

for (int i = -3; i <= 3; i++)

{

 int pl = min(6, (3 - abs(i)) * 2 + 1);

 p(6-pl, pl);

 i == 0 ? p(0, 6) : p(6, 0);

 p(0, pl);

 putchar('\n');

}

getchar();

}


Answer Link

Otras preguntas

how do you say garden in french
The moon will always appear over the eastern horizon at the same time each night. true or false
This is a series of biochemical reactions in photosynthesis that do not require light to proceed and produce the organic molecule, glucose, from carbon dioxide.
Would this be a use of personification?? I need to know ASAP!!! "In the night his eyes carry him to unknown places".
Why is taxonomy important?
Lines that are parallel have the same slope or else no slope.
What would most likely happen if the amount of phytoplankton in the ocean were reduced?
Many businesses have been reluctant to embrace cloud computing citing _____ concerns.
What is an array that is used in science?
What is the idea of a shield law