thenuke321

Untitled

Aug 21st, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. void main ()
  6. {
  7.     signed long int find(0);
  8.     signed long int hold(0);
  9.     signed long int rounds(0);
  10.     signed long int findNum(0);
  11.     cout << "Enter the source and target" << endl;
  12.     find = 3408862625;
  13.     findNum = 1505;
  14.     system("pause");
  15.     while(true)
  16.     {
  17.         hold++;
  18.         rounds = find / hold;
  19.         if(rounds == findNum)
  20.         {
  21.             cout << rounds << endl;
  22.             cout << "Found in " << hold << " rounds" << endl;
  23.             system("pause");
  24.             exit(0);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment