This is a for loop program in which we will find the Lowest Common Factor(LCM) of 2 & 3 till 50 with the help of the C Programming language.
#include <stdio.h>
int main()
{
int i;
printf("Numbers between 1 to 50 that are divisible by 2 and 3 are:-\n");
for (i = 1; i <= 50; i++)
{
if (i % 2 == 0 && i % 3 == 0)
{
printf("%d\n", i);
}
}
return 0;
}
//......Coded by YASH ALAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP