fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int N = 48;
  6.  
  7. for (int i = 1; i <= N; i++) {
  8. for (int j = i; j <= N; j++) {
  9. if (i * j == N) {
  10. cout << i << " * " << j << " = " << N << endl;
  11. }
  12. if (i * j > N) {
  13. break;
  14. }
  15. }
  16. }
  17.  
  18. return 0;
  19. }
  20.  
  21.  
  22.  
  23.  
  24.  
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
1 * 48 = 48
2 * 24 = 48
3 * 16 = 48
4 * 12 = 48
6 * 8 = 48