Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int counter = 0, num, a = 0;
- printf("Instert a number: "); scanf_s(" %d", &num);
- /*while (counter < 10);
- {
- if ((num % 2 == 0) || (num % 3 == 0) || (num % 5 == 0))
- {
- counter++;
- a = num;
- printf("%d:%d ", counter, a);
- }
- num++;
- }*/
- for (size_t i = 0; counter < 10; i++)
- {
- if ((num % 2 == 0) || (num % 3 == 0) || (num % 5 == 0))
- {
- counter++;
- a = num;
- printf("%d:%d ", counter, a);
- }
- num++;
- }
- printf(" \n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement