0
How to assign values in an array using for loop?
5 ответов
0
In which programming Language do you what to archive this?
0
cpp
0
here is how a for loop in c++ works:
https://code.sololearn.com/cvO4SHwPIwR8/?ref=app
I think you'll get it how to assign values from an array in the for loop!
0
I'll do it in C++
#include <iostream>
using namespace std;
int main() {
int arr[9];
for(int i = 0; i<10; i++) {
cout << "enter a number";
cin >> arr[i];
}
return 0;
}
0
thank you.