Skip to content

Instantly share code, notes, and snippets.

@Crepu
Created September 14, 2016 02:15
Show Gist options
  • Save Crepu/76d9b70c3ab0b2c38cd73439e4afa5ba to your computer and use it in GitHub Desktop.
Save Crepu/76d9b70c3ab0b2c38cd73439e4afa5ba to your computer and use it in GitHub Desktop.
#include <iostream>
#include <fstream>
#include <string>
#include <typeinfo>
using namespace std;
int main(){
ifstream entrada("numeros");
float notas[10][10] = {0};
int i = 0, j = 0;
string s;
while(!entrada.eof()){
for(j=0; j<10; j++){
entrada >> s;
notas[i][j] = stof(s);
}
i++;
}
for (int i = 0; i < 10; ++i)
{
for (int j = 0; j < 10; ++j)
{
cout<<notas[i][j]<<" ";
}
cout<<endl;
}
entrada.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment