How to create an array that takes integers as its element ??[i want to input the integers ] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to create an array that takes integers as its element ??[i want to input the integers ]

how to create a float array ???

16th Jan 2017, 6:49 PM
Siddharth Naithani
Siddharth Naithani - avatar
1 Answer
+ 4
int size=5; int arr[5]; for(int i=0;i<size;i++){ cout << "Enter value:"; cin >> arr[i]; } of course, replace int with float if you want it to be a floats array
16th Jan 2017, 7:42 PM
Burey
Burey - avatar