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 do plants need soil to live give examples please
What type of protist is pictured?
how many atoms are all in one molecule of ferric sulfide
Sam spent a total of $90 at the grocery store. of this amount, he spent $72 on fruit. What percentage of the total did he spend on fruit?
I will give brainliest to the best answer! Please give me a current example of a terrorist act.
Which weighs less regular soda or diet soda?
What phrase best defines a thesis statement? A. the broad research topic B the first sentence of a paper C the specific point proven through careful resea
suppose you wanted to make 100 grams of water. how many moles of water are in 100 grams
he drinks and smoke ( re write using not only.........)​
Find the circumference of a circle whose area is [tex]24\pi[/tex] ft^2 A.[tex]2\sqrt{6}[/tex] B. [tex]4\sqrt{6}[/tex] C. [tex]12\pi[/tex] D. [tex]24\pi[/tex]