Created
June 5, 2015 08:43
-
-
Save BraynStorm/b129002a4d87c6a4fe1c to your computer and use it in GitHub Desktop.
Bojidar_PK2_zad2.cpp
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 <cstdlib> | |
#include <fstream> | |
#include <string> | |
#include <cmath> | |
using namespace std; | |
int main(){ | |
ifstream file("zad_1.txt"); | |
string data = ""; | |
for(int i = 0; i < 5 * 2; i++){ | |
string s = ""; | |
file >> s; | |
data.append(s); | |
data.append(" "); | |
if( i % 2 ){ | |
data.append("\n"); | |
} | |
} | |
cout << data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment