Help for beginner please!
Can someone please show me how I can ask a user for numbers one at a time i.e.:
1
2
3
4
and then turn that number into one number of 1234. I have been trying everything that I can think of and can't figure it out. Please help!
Steph
Code:
#include<iostream.h>
void showvalues(int[]);
void main ()
{
int num1[5], num2[5];
cout<< "enter number" <<endl;
for (int count = 0; count < 5; count++)
cin >> num1[count];
showvalues(num1);
cout << endl;
cout<< "enter number" <<endl;
for (int count1 = 0; count1 < 5; count1++)
cin >> num2[count1];
showvalues(num2);
cout << endl;
}
void showvalues(int nums[])
{
for(int index = 0; index < 5; index++)
cout <<nums[index] << "";
}