Advertisement
Guest User

Untitled

a guest
May 20th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. void liczenie(int &liczba,int *l1, int *l2, int *l3)
  7. {
  8. *l1=liczba/100;
  9. *l2=(liczba/10)%10;
  10. *l3=liczba%10;
  11. cout<<*l3<<'\t'<<*l2<<'\t'<<*l1;
  12. };
  13.  
  14. int main()
  15. {
  16. int liczba,l1,l2,l3;
  17. cout<<"podaj liczbe"<<endl;
  18. cin>>liczba;
  19. liczenie(liczba,&l1,&l2,&l3);
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement