Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream fd("Duomenys.txt");
- char a[256];
- int paz[30][500];
- string temp;
- int j= 0, n = 1;
- while(!fd.eof()) {
- j++;
- n = 1;
- fd.getline(a,256);
- temp = a;
- for (int i = 0; i <= temp.size(); i++){
- if(temp[i]-48 == -48)
- {
- break;
- }
- else if (temp[i] != ' ')
- {
- paz[j][n] = temp[i]-48;
- cout << paz[j][n] << endl;
- n++;
- }
- }
- cout << "naujas masyvas" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement