hey guys,
i'm making a program that counts n common multiples of 2 numbers, like:
the user enter value for n (32 for exmple), and from 1 to 32 i have to count the number of multiples of 3 that aren't multiples of 7.
The code i've done, doesnt work, dont know why, please help me:
Code:
#include <stdio.h>
main(){
int counter,n,multiple3, multiple7, multiple;
printf("Enter n: ");
scanf("%d", &n);
for(counter=1;counter<=n;counter++){
multiple3=3*counter;
scanf("%d",&multiple3);
}
for(counter=1;counter<=n;counter++){
multiple7=7*counter;
scanf("%d",&multiple7);
}
while (multiple3!=multiplo7)
multiple=multiple3;
printf("%d", multiple);
}