New course! Every coder should learn Generative AI!
Try a free lesson0
made a code which prints all the input numbers as an array, can it be reduced?
2 Answers
+ 2
int a[50], n;
cin >> n;
for(unsigned x = 0; x < n; cin >> a[x], x++);
for(unsigned x = 0; x < n; cout << a[x] << endl, x++);
0
thanks rodwynnejones