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

If the fourth multiple of three is subtracted from the third multiple of four, what is the difference?
What are two economic reasons for imperialism
Saltwater is denser than freshwater what ecosystem would be most affected by this fact
what is the primary product of light independent reactions
Which sentence contains an intransitive verb? A.) Ian sharpened his hockey skates. B.) Carla skates before school in the morning. C.) Our hockey team won the le
How did Sargon's creation of an empire change the history of Mesopotamia
True or false- Historians have proven that the pilgrims didn't really wear those funny hats and buckles on their shoes.
80 is 160% of what number?
Suppose a patient comes in to see a physician. This patient lacks the ability to keep warm and needs to wear heavy clothing even during mild temperatures. Whic
which organelle should be listed under "both" in the diagram plants and animals ? A. Centriule B. Mitochondrion C. Chloroplast D. Cell wall