Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- #include <string>
- using namespace std;
- void wykonajOperacje( int liczba1, char, int liczba2 )
- {
- cout << liczba1 << " , " << liczba2 << " -> " << liczba1*liczba1 << " , " << liczba2*liczba2 << endl;
- }
- void wczytajPlik()
- {
- ifstream plik;
- plik.open( "wektory.txt");
- int a;
- char b;
- int c;
- do {
- plik >> a >> b >> c;
- if( plik.good() )
- wykonajOperacje( a, b, c );
- }
- while(!plik.eof());
- plik.close();
- }
- int main()
- {
- wczytajPlik();
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement