Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- string odwrut(string a)
- {
- string wyraz="";
- int j=a.length();
- for (int i=j-1; i>=0; i--)
- {
- wyraz=wyraz+a[i];
- }
- return wyraz;
- }
- int main(int argc, char** argv) {
- fstream odczyt("slowa.txt");
- string a;
- string b;
- for (int i=0; i<1000; i++)
- {
- odczyt>>a;
- b=odwrut(a);
- cout<<b<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement