hi.. I'm trying to learn how to use arrays with a for loop. I basically want to create an array of 10 integers and set the values from 1 to 10. Here is what i have so far but it doesn't even run..?? thanks in advance( keep in mind, i am a newbie so be gentle...) Also, how would i do this with a while loop?
Code:#include <stdio.h> main() { int x; int array[20]; for(int x=0; x<20; x++) cout<<array[x]; }