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

write each decimal as a fraction or mixed numbest form. -7.08
when resources are used to write an essay, this needs to be place at the end in order to avoid plagiarism
Which values for x and y make the statement (x + 5)(y - 6) = 0 true? x = 5, y = -6 x = 5, y = 6 x = -5, y = 6 x = -5, y = -6
what's five decimal 55 as a fraction
How many moles of MgS2O3 are in 241 g of the compound?
muscles move bones by __________. relaxing against them pushing them pulling them stretching back and forth
what vowel sound does the ei make in this word? neither
what is hiv infections
Which work is the best example of an adaptation? A. A speech given by a political candidate B. A popular song played on the radio C. A recently discovered
a relief map is different than a physical map in that?