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 does y=x+5 mean to do in a graph ?
28/12 simplified (In simplest form.)
which measurement would be least likely to be written in scientific notation: number of stars in a galaxy , number of grains of sand on a beach, speed of a car
The length of the Titanic was 182 feet. Porter's history class is building a model of the Titanic. The model is 1/100 of the actual link of the ship. How long i
How did thomas paine's pamphlet Common Sense change the way many people viewed their king? what other significant effects did it have?
You subscribe to m different magazines. Your friend subscribes to 2 fewer than you
4 times as much money as $5
The __________ nervous system controls body functions that do not require thought.
Identify the action verb: The car raced toward its destination. a. raced b. toward c. destination d. car
What does the speaker in this poem say will happen to "thy thoughts, when thou art gone"?