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

26th Apr 2018, 3:43 AM
tosif khan
tosif khan - avatar
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; }
26th Apr 2018, 4:39 AM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar