Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <string>
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- using namespace std;
- int main(int argc, char** argv) {
- string dane;
- cin >> dane;
- int plicz = atoi(dane.c_str())/10;
- cout << plicz << endl;
- if(false)
- {
- cout << "zly pesel" << endl;
- }else
- {
- int psprawdz[11];
- int pomoc=plicz;
- psprawdz[0]=atoi(dane.c_str())%10;
- cout << pomoc<<endl;
- for(int i=1;i<11;i++)
- {
- psprawdz[i]=pomoc%10;
- pomoc=pomoc/10;
- }
- for(int i=0;i<11;i++)
- {
- cout << psprawdz[i];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement