wonman

Untitled

Feb 7th, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <cstdlib>
  5. using namespace std;
  6.  
  7.  
  8. int main()
  9. {
  10.  
  11. string wynik1;
  12. string wyraz;
  13. int dlug = wynik1.length();
  14. int ilosc=0;
  15.  
  16.  
  17.  
  18.  
  19. //int i = atoi(str.c_str());
  20.  
  21. int wynik = atoi(wynik1.c_str());
  22. ifstream IN;
  23. IN.open("pob.txt" , ios::in);
  24.  
  25. if (IN.is_open())
  26.  
  27. {
  28.  
  29. while(IN >> wyraz)    
  30.     {
  31.        
  32.         cout<<wyraz<<endl;
  33.         wynik1=wynik1+wyraz;
  34.    
  35.     }
  36.    
  37.     cout<<endl<<endl;
  38.    cout<<wynik1;
  39.    
  40.     /*for(int i=0;i<5;i++)
  41. {
  42.     int tmp;
  43.     for(int i=dlug;i>0;i--){
  44.         for(int j=0;j<i;j++){
  45.             if(wynik[j]<wynik[j+1])
  46.             {
  47.                
  48.                 wynik[j]=wynik[j+1];
  49.                 wynik[j+1]=tmp;
  50.             }
  51.         }
  52.     }    
  53.    
  54.    
  55. } */  
  56. }
  57.     return 0;
  58. }
  59.  
  60. /*
  61.  
  62. for(int i=50;i>0;i--){
  63.         for(int j=0;j<i;j++){
  64.             if(ludzie[j].pkt<ludzie[j+1].pkt)
  65.             {
  66.                 struct zawodnik tmp=ludzie[j];
  67.                 ludzie[j]=ludzie[j+1];
  68.                 ludzie[j+1]=tmp;
  69.             }
  70.         }
  71.     }    
  72. */
Advertisement
Add Comment
Please, Sign In to add comment