Advertisement
Guest User

Untitled

a guest
May 27th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. main()
  6. {
  7.  
  8.  
  9.  
  10. cout<<"Program do zamiany liczby w systemie dziesietnym na liczbe w systemie binarnym"<<endl<<endl;
  11. cout<<"Podaj liczbe w systemie dziesietnym"<<endl<<endl;
  12.  
  13. int liczba;
  14. int dzielnik;
  15.  
  16. while(1)
  17. {
  18. cin>>liczba;
  19. do
  20. {cout<<liczba%2;
  21. liczba=liczba/2;
  22. }
  23. while (liczba>0);
  24.  
  25.  
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement