How can i enter 10 elements from user in an array and print them in one line using functions? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i enter 10 elements from user in an array and print them in one line using functions?

User will enter 10 values and store them ina array afterwards prints those values in a single line using function?

2nd Mar 2021, 1:45 PM
asim hateez
asim hateez - avatar
5 Answers
+ 4
I suggest you to continue your study with C++ in order for you to tackle that task.
2nd Mar 2021, 1:51 PM
Ipang
+ 3
#include <iostream> using namespace std: int main () { // declare an array // iterate through array and assign input to each item; or assign input to each item manually // iterate through array and print each item; or print each item manually return 0; } /* now your task is to write the code that does as described in comments! (you can ask us something if you are stuck) */
2nd Mar 2021, 1:52 PM
#0009e7 [get]
#0009e7 [get] - avatar
+ 3
Hi, bro, this function should be born in your head
2nd Mar 2021, 2:20 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
asim hateez, sorry, forgot about that. You can do the function by yourself. Tips to revise: https://www.sololearn.com/learning/1635/ , https://www.sololearn.com/learning/1636/ and https://www.sololearn.com/learning/1642/
2nd Mar 2021, 2:07 PM
#0009e7 [get]
#0009e7 [get] - avatar
+ 1
But bro where is the function..? 🤔🤔
2nd Mar 2021, 1:55 PM
asim hateez
asim hateez - avatar