Home > Back-end >  A very simple code, but the output stuck there!
A very simple code, but the output stuck there!

Time:09-22

Note output there, each to have a space between the two Numbers, no Spaces in front of in the beginning, the focus is on the end of each line number behind no Spaces, printf statements should be how to write inside the

CodePudding user response:

Post your code and see,

CodePudding user response:

So to write?
While (... ) {
for(int x=0; x<10; X++) printf (" % d ", d);
printf("\n");
}

CodePudding user response:

refer to the original poster qq_36896043 response:
note that output there ah, there should be Spaces between every two Numbers, no Spaces in front of in the beginning, the focus is on the end of each line number behind no Spaces, it should be how to write printf statements

1 cycle is less than 1000
2 for prime Numbers, with a function to determine whether is getting ready to turn out
3 with a variable to record the current row number, more than 10 line and reset

CodePudding user response:

The
reference 3 floor futulove response:
Quote: refer to the original poster qq_36896043 response:

Note output there, each to have a space between the two Numbers, no Spaces in front of in the beginning, the focus is on the end of each line number behind no Spaces, it should be how to write printf statements

1 cycle is less than 1000
2 for prime Numbers, with a function to determine whether is getting ready to turn out
3 with a variable to record the current row number, more than 10 will wrap and reset

I would write code, how is the output line 10, each have a space between the two, there is no space behind the last number, such as printf (" % d ", s) but in this way, 10 last digits behind there will be a blank space

CodePudding user response:

9 first loop output with the blank space, and finally output a newline,

CodePudding user response:

is this format?

CodePudding user response:

Separate the Numbers and Spaces, output in the output space with judgment, whether to output the 10 Numbers, if the output is a newline
  • Related