Home > Back-end >  Digital nabla
Digital nabla

Time:11-28

How to output the output of the 1234567890123456... The format

CodePudding user response:

In your code and add a judge whether more than 10, on the sample of the output is 1234567890123, and the output of your code is 12345678910111213
 
For (int j=1; J & lt; A - 2=2 * * I + 1; J++)
{
If (j & lt; 10)
Cout & lt; The else
Cout & lt; }

CodePudding user response:

 
int a;
While (STD: : cin & gt;> A)
{
For (int I=1; I & lt;=a; + + I)
{
For (int j=1; J & lt; i; + + j)
{
STD: : cout & lt; <"";
}

For (int j=1; J & lt; A - 2=2 * * I + 1; + + j)
{
STD: : cout & lt; }

STD: : cout & lt; }
}

CodePudding user response:

CodePudding user response:

https://img-blog.csdnimg.cn/20201127115328979.png? X - oss - process=image/watermark, type_ZmFuZ3poZW5naGVpdGk, shadow_10, text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hpYW5mYWp1c2hp, size_16, color_FFFFFF, t_70

CodePudding user response:

https://img-blog.csdnimg.cn/20201127115340389.png? X - oss - process=image/watermark, type_ZmFuZ3poZW5naGVpdGk, shadow_10, text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hpYW5mYWp1c2hp, size_16, color_FFFFFF, t_70

CodePudding user response:

reference 3 floor wise men know already should good karma response:
again is misleading newcomer bad cout & lt; Attention the ends are not new to cout using the parameters of the
Don't learn
  • Related