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

What tactic did Palestinians use against Israel in 1987
For every touchdown scored by the Timberwolves the mascot does three backflips if the cheerleaders set off six confetti cannons how many touchdowns did the Timb
what is the correct tRNA sequence that would match the following mRNA sequence.GCGAUA
whats four fifths to the first power
For each of the following types of reactions, write a general reaction formula in the symbolic form—for example, A + B → AB. single-displacement double-di
​ y=2x−1 5x−4y=1 ​ Is (1,1)(1,1) a solution of the system?
Emily is reading her friend's story. It uses transition words like and Emily can tell that this story's organization is __________. A) sequence of events B)
The Antifederalists supported the Constitution and felt that the U.S. needed a strong central government. True False
The internal combustion engine was an innovation of PLZHELP
What is the area of the shaded sector?