0
How to print an array to the screen in c++?
I need the full array.
4 Respostas
+ 10
#include<iostream>
using namespace STD;
int main(){
int a[5],i;
cout<<"Enter 5 elements";
for(i=0;i<5;i++)
cin>>a[i];
cout<<"Entered array is:";
for(i=0;i<5;i++)
cout<<a[i];
return 0;
}
+ 6
Sorry for the wait
Here is a foreach loop example
- it automaticly lists the entire array
https://code.sololearn.com/cWP33Pz6Jp8x/?ref=app
+ 3
hope this helps
https://code.sololearn.com/cOmocZ9B9R7q/?ref=app
+ 2
With for and cout