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

turn 12/75 into a decimal
What does the passage reveal about the ancient Greek culture?
ATP is composed of a nitrogenous base, a sugar, and
Bacteria can develop mutations that provide them with resistance to antibiotic medications. Why would giving multiple antibiotics at once be less likely to crea
Where is Buddhism widely practiced today?
what 2 events increase power output
how does P minus 13 equals -2
2. What is the solution to the equation? If necessary, round your answer to the nearest tenth. A. 3x^2 = 48 B. x^2 – 2 = 12
All living things need energy; it is a requirement for life. In a typical cell, ATP, the high energy molecule, is produced in the __________ in the presence of
What did Darwin believe?