Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. // Created by Damian Konopka ELO
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11. {
  12. string tekst;
  13. cin >> tekst;
  14. int dlugosc = tekst.length();
  15. int pozycja = -1;
  16. pozycja = tekst.find('.');
  17. if(pozycja>=0)
  18. tekst.replace(pozycja, 1, ",");
  19. else
  20. {
  21. tekst.erase(dlugosc-2, 2);
  22. tekst.erase(0, 2);
  23. }
  24. cout << tekst << endl;
  25. system("pause");
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement