current position:Home>The format requires a space between N and a[N]

The format requires a space between N and a[N]

2022-09-23 04:22:33CSDN Q&A

If you need to enter the number N first, and then enter the N-bit elements in the array a[N], the format requires a space between N and a[N].
For example, input 5 and then input five numbers
The output format is as follows:
5 1 5 4 6 2
Do you need to use two scanf or a for loop to output this way?It doesn't feel right

copyright notice
author[CSDN Q&A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/266/202209161237151968.html

Random recommended