Answer to Question #7942 in C++ for ronnie
using arrays write a simple program to display numbers 1-20
1
2012-03-29T13:01:47-0400
#include <iostream>
using namespace std;
int main()
{
int arr[20];
int i;
for (i=0;i<20;i++)
{
& arr[i] = i+1;
}
for (i=0;i<20;i++)
{
& cout<<arr[i]<<" ";
}
cout<<endl;
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment