Created
October 26, 2015 02:03
-
-
Save HereChen/973f93a02b4a80d6c492 to your computer and use it in GitHub Desktop.
input data -> save to array -> display
This file contains 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
#include <iostream> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
int array[100][2], count, cina, cinb; | |
count = 0; | |
cout << "input:" << endl; | |
while ( cin >> cina >> cinb ){ | |
array[count][0] = cina; | |
array[count][1] = cinb; | |
count++; | |
} | |
cout << "display:" << endl; | |
for (int i = 0; i < count; i++){ | |
cout << array[i][0] << " " << array[i][1] << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment