fork(1) download
  1. // dvach.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. //#include "stdafx.h"
  5. using namespace std;
  6. #include <iostream>
  7. void check_divide(int numbers)
  8. {
  9. int divide;
  10. int j = 1;
  11.  
  12.  
  13. cout << numbers;
  14. for (int k = 2; k < numbers; k++)
  15. {
  16.  
  17. if (numbers != k && numbers%k == 0)
  18. {
  19. cout << "\t\t\t";
  20. divide = k;
  21. cout << k;
  22. j++;
  23. if (j == 4)
  24. {
  25.  
  26. printf("\n");
  27. j = 0;
  28. }
  29.  
  30. }
  31.  
  32.  
  33. }
  34.  
  35. }
  36.  
  37.  
  38.  
  39.  
  40. int main()
  41. {
  42. cout << "Number \t Dividers \n";
  43.  
  44. for (int i = 480; i <= 500; i++)
  45. {
  46. check_divide(i);
  47. cout << "\n";
  48. }
  49.  
  50.  
  51.  
  52.  
  53.  
  54. }
  55.  
  56.  
  57.  
  58.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Number   	 Dividers 
480			2			3			4
			5			6			8			10
			12			15			16			20
			24			30			32			40
			48			60			80			96
			120			160			240
481			13			37
482			2			241
483			3			7			21
			23			69			161
484			2			4			11
			22			44			121			242

485			5			97
486			2			3			6
			9			18			27			54
			81			162			243
487
488			2			4			8
			61			122			244
489			3			163
490			2			5			7
			10			14			35			49
			70			98			245
491
492			2			3			4
			6			12			41			82
			123			164			246
493			17			29
494			2			13			19
			26			38			247
495			3			5			9
			11			15			33			45
			55			99			165
496			2			4			8
			16			31			62			124
			248
497			7			71
498			2			3			6
			83			166			249
499
500			2			4			5
			10			20			25			50
			100			125			250