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 is the meaning of Accountant​
How did 1930’s reflect art and music
What does Rainsford find in the joungle?
Identify for farming methods that result in soil conversation
I need help with number 7, and the second part of number 8. Thank you!
The focal length of a lens is inversely proportional to the quantity (n-1), where n is the index of refraction of the lens of the material. The value of n, howe
how do I calculate the surface area of this bookshelf? ​
let f(x)=x+a/x+b such that f(f(1)=0 & f(2)=-3 then a&b resctivily are. A, 1,-5/3 B, -5/3,3 C, 1,-3 D,none of the above​
15 POINTS! WILL GIVE BRAILEST!Islam, Christianity, and Judaism all claim _______________ as a holy city. Nazareth Mesopotamia Jerusalem Bethlehem Mecc
What are temperature lines and Illumination zones? ​