Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <string>
  6. #include <sstream>
  7. using namespace std;
  8.  
  9. int main() {
  10. srand(time(NULL));
  11. cout<<"Trzeci konwenter - Stosujac szybka metode konwersji - przelicz nastepujace liczby binarne na system dziesietny";
  12. cout<<"\n";
  13.  
  14. cout<<"Zadanie do wykonania na zajeciach";
  15. for(int i=0;i<5;i++){
  16. cout<<"\nPrzekonwertujmy liczbe ";
  17. for(int j=0;j<rand()%(12-5+1)+5;j++)
  18. cout<<""<<rand()%2;
  19. }
  20.  
  21. cout<<"\n\n**********************";
  22. cout<<"\nZadanie do wykonania w domu";
  23. for(int i=0;i<10;i++){
  24. cout<<"\nPrzekonwertujmy liczbe ";
  25. for(int j=0;j<rand()%(12-5+1)+5;j++)
  26. cout<<""<<rand()%2;
  27. }
  28.  
  29.  
  30. cout<<"\n\nNastepnie zaimplementuj ponizej metode konwersji;
  31. //Miejsce na implementacje
  32.  
  33. //kod programu
  34.  
  35. //Koniec implementacji
  36.  
  37. getchar ();
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement