Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <iostream>
- using namespace std;
- #include <iomanip>
- #include <math.h>
- #include <cmath>
- #include <string>
- int main()
- {
- int upborderoffirst;
- int upborderofsecond;
- int upborderofthird;
- cin >> upborderoffirst;
- cin >> upborderofsecond;
- cin >> upborderofthird;
- int one = 1;
- int two = 1;
- int three = 1;
- for (int one = 1; one <= upborderoffirst; one++) {
- for (int two = 2; two <= upborderofsecond; two++) {
- bool isprime = true;
- for (int n = 2; n < two; n++) {
- if (two % n == 0) {
- isprime = false;
- }
- }
- for (int three = 1; three <= upborderofthird; three++) {
- if (one % 2 == 0 && isprime == true && three % 2 == 0) {
- cout << one << " " << two << " " << three << endl;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement