Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #include <string>
- #include <sstream>
- using namespace std;
- int main() {
- srand(time(NULL));
- cout<<"Trzeci konwenter - Stosujac szybka metode konwersji - przelicz nastepujace liczby binarne na system dziesietny";
- cout<<"\n";
- cout<<"Zadanie do wykonania na zajeciach";
- for(int i=0;i<5;i++){
- cout<<"\nPrzekonwertujmy liczbe ";
- for(int j=0;j<rand()%(12-5+1)+5;j++)
- cout<<""<<rand()%2;
- }
- cout<<"\n\n**********************";
- cout<<"\nZadanie do wykonania w domu";
- for(int i=0;i<10;i++){
- cout<<"\nPrzekonwertujmy liczbe ";
- for(int j=0;j<rand()%(12-5+1)+5;j++)
- cout<<""<<rand()%2;
- }
- cout<<"\n\nNastepnie zaimplementuj ponizej metode konwersji;
- //Miejsce na implementacje
- //kod programu
- //Koniec implementacji
- getchar ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement