Created
June 22, 2013 17:17
-
-
Save pfallasro/5841646 to your computer and use it in GitHub Desktop.
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> | |
#include <fstream> | |
#include <cstdlib> | |
#include <string> | |
using namespace std; | |
int main() { | |
int i, j, dimension, elemento; | |
ifstream myfile; | |
myfile.open ("example.txt"); | |
while ( myfile.good() ){ | |
if(i==0){ | |
myfile >> dimension; | |
cout << dimension; | |
int matriz [dimension][dimension]; | |
}else{ | |
myfile >> elemento; | |
cout << elemento ; | |
} | |
cout << endl; | |
i++; | |
} | |
myfile.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment