Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Compiled under Crunchbang GNU/Linux using g++
- #include<iostream>
- using namespace std;
- int main()
- {
- bool Done;
- for (int i = 100; i > 0; i++)
- {
- Done = true;
- for (int n = 1; n <= 20; n++) if (i%n != 0) Done = false;
- if (Done == true)
- {
- cout << i << endl;
- break;
- }
- }
- return 0;
- }
- /*
- user@computer:~/Programming$ ./SmallestMultiple
- 232792560
- */
Advertisement
Add Comment
Please, Sign In to add comment