wonman

Untitled

Feb 26th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string>
  4. #include <fstream>
  5.  
  6. using namespace std;
  7.  
  8. int main(int argc, char* argv[])
  9. {
  10. string tab = argv[1];
  11.  
  12. size_t pozycja = tab.find(" ");
  13.  
  14. int table[100];
  15. cout<<tab<<endl;
  16.  
  17.  
  18. for(int i=0; i<tab.length();i++){
  19.  
  20.  
  21. pozycja = tab.find(" ");
  22. string nowy = tab.substr(0, pozycja);
  23. tab.erase(0,1);
  24. table[i]=atoi(nowy.c_str());
  25.  
  26. cout<<table[i];
  27.  
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment