hi. i have been having a hard time trying to use arrays on my program :/
im supposed to create a program that will accept no. for the last loop then display the 3rd highest data, display the input data, and the reverse of the data from last input to first input.
this is only what i have and i dont know where to start
someone help me? :/
#include <iostream>
usingnamespace std;
int main()
{
int no,a,in;
a=0;
cout<<"Enter number for the last loop: \n";
cin>>no;
while(a<no)
{
cout<<"Enter a number:\n";
cin>>in;
a++;
}
system("pause");
}
Well, you probably will need to declare at least one array in your code - which you have not done so far.
I would advise you to go over this section of the tutorial on this site:
http://cplusplus.com/doc/tutorial/arrays/
Basically you will have to define an array, then you can use for-loops to traverse the array and perform reading / writing operations on it.
Let us know if you have any further questions after reading that part of the tutorial.