Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string>
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5. using namespace std;
  6. int main(int argc, char** argv) {
  7. string dane;
  8. cin >> dane;
  9. int plicz = atoi(dane.c_str())/10;
  10. cout << plicz << endl;
  11. if(false)
  12. {
  13. cout << "zly pesel" << endl;
  14. }else
  15. {
  16. int psprawdz[11];
  17. int pomoc=plicz;
  18. psprawdz[0]=atoi(dane.c_str())%10;
  19. cout << pomoc<<endl;
  20. for(int i=1;i<11;i++)
  21. {
  22. psprawdz[i]=pomoc%10;
  23. pomoc=pomoc/10;
  24. }
  25. for(int i=0;i<11;i++)
  26. {
  27. cout << psprawdz[i];
  28. }
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement