Created
May 31, 2016 01:13
-
-
Save justgo129/ee44eb680b36363cca2006607fe8e032 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++ program asks user to input 5 values (to fill array) | |
// and then the computer returns those five values. | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// get input from users | |
int arr[5]; | |
cout<<"Please state 5 integers\n"; | |
cin.get(); | |
for (int i=0; i<5; i++ ) { | |
cin>> arr[i]; | |
} | |
// we now return those identical values | |
for (int i =0; i<5; i++) { | |
cout << " " << arr[i]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment