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

You have 10 gallons of lemonade to sell. (1 gal $\approx$ 3785 cm3) a. Each customer uses 1 paper cup. The cups are sold in packages of 50. How many packages sh
Find the product and simplify your answer. 7a5(-3a⁴ + 5а - 5 )​
PLEASE HELP!! This is due in a bit please help mee
yuurrrr i need help yo plz help
Which of the following is equal to the rational expression when x = 5 or -3? x^2+x-6/x^2-2x-15 A. X-6/x-5 B. X+3/c-5 C. X-2/X+3 D. X-2/x-5
A bag contains 3 blue marbles, 8 green marbles, and 4 red marbles. One marble is drawn from the bag. What is the probability that the marble drawn is not blue?
If the diameter is 12 cm then the circumference is​
How do you find the radios and the height for this problem?
Which factor contributed most to the beginning of the women's-rights movement in the United States during the mid-1800s? dramatic increase in women's participat
Enter a phrase for the expression