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

Part a: if (6^2)^x = 1, the value of x is 0. the reason for it being 0 is because anything to the power of 0 equals 1. part b: if (6^0)^x = 1, then the value of
Which statement describes the most common characteristic of oral narratives? a. the audience can participate. b. characters face internal struggles. c. they
in at least 150 words, describe how wheatley uses figurative language and symbolism to convey her message about god in "an hymn to the evening."
What is a commission in art
Who holds the constitutional power to declare war? (1 point) congress president states supreme court
you buy a board that measures 120 inches long . how many eight inch sections can you cut from this board
(5x-4)^2 (5x-4)factor
How did Kennedy’s actions in Southeast Asia set the stage for future conflict?
Who was the first president
the city of paris, france is in which hemispheres?