Guest User

Untitled

a guest
Mar 8th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int a0,a1,a2,w;
  7.  
  8.     cout<<"Podaj dowolna liczbe z przezialu {1...65536}"<<endl;
  9.     cin>>a0;
  10.  
  11.     if(a0<=0)
  12.     {
  13.         cout<<"Podales liczbe nie nalezaca do przedzialu, BLAD"<<endl;
  14.         return 0;
  15.     }
  16.  
  17.     a1=(75*a0)%65536;
  18.  
  19.     for(int i=0;i<10;i++)
  20.     {
  21.  
  22.         w=(75*a1)%65536;
  23.         a2=a1;
  24.         a1=w;
  25.  
  26.         cout<<w<<endl;
  27.     }
  28.     cout<<"Skonczylem..."<<endl;
  29. }
Add Comment
Please, Sign In to add comment