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

How are fats different in composition from carbohydrates?
Does (6,3) make the inequality 16x+ 20y≤5 true?
Which best states Trevor’s position on gardening?
What are temperature lines and Illumination zones? ​
please help me with this question
7x+2y=-28Help write slope-intercept form pls​
Help me out.....30Pt. When a Country needs External/Foreign Debt? Relate it o State bank reserve of that country and other things
what was the significance of the pamphlet common sense????
Which equation represents an exponential function that passes through the point (2,80)? Fx) = 4(x)5 F(x)=5(x)4 F(x)= 4(5)x F(x)=5(4)x
Mr Gupta sold 1/2 of his land. He gave 1/3 of the remaining part to his son, 1/4 to his daughter and 1/4 to the orphanage.What part of land did he get?