You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
342 B

#include <bits/stdc++.h>
using namespace std;
void output(int b, int i) {
printf("\n%d = 800 * %d + 9 * %d \n", b, i, i);
}
int main() {
int b, i;
for (i = 10; i < 100; i++) {
b = i * 809;
if (8 * i < 100 && 9 * i >= 100 && b == 800 * i + 9 * i)
output(b, i);
}
return 0;
}