-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.c
24 lines (19 loc) · 736 Bytes
/
2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
///2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
///What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? /// 232792560
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
void main()
{
long int i=20;
while(i)
{ int j,count=0;
for(j=2;j<=20;j++)
{
if(i%j==0) count++;
}
if(count==19) { printf("number is:: %d",i); break; }
i++;
}
}