0
Can anyone show me how to insert 10 values from 0-100 in an array using for loop
insert 0 to 100 integers with the difference of 10 like (0,10,20,30,......100) by using for loop if possible
1 Answer
0
#include <iostream>
using namespace std;
int main() {
int a[11];
for (int i = 0; i <= 10; i++)
a[i] = i * 10;
for (int i = 0; i <= 10; i++)
cout<<"a["<<i<<"\] ="<<a[i]<<endl;
return 0;
}