Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- void main ()
- {
- signed long int find(0);
- signed long int hold(0);
- signed long int rounds(0);
- signed long int findNum(0);
- cout << "Enter the source and target" << endl;
- find = 3408862625;
- findNum = 1505;
- system("pause");
- while(true)
- {
- hold++;
- rounds = find / hold;
- if(rounds == findNum)
- {
- cout << rounds << endl;
- cout << "Found in " << hold << " rounds" << endl;
- system("pause");
- exit(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment