#include <stdio.h>
int main()
{
int n;
printf("Input number amount: ");
scanf("%d", &n);
for(int i = 0; i < n; i++)
int x;
printf("\nInput number: ");
scanf("%d", &x);
if(x % 3 == 0 && x != 0)
printf("Number is divisible by 3\n");
else
printf("Number is not divisible by 3\n");
}
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <stdio.h>
int main()
{
int n;
printf("Input number amount: ");
scanf("%d", &n);
for(int i = 0; i < n; i++)
{
int x;
printf("\nInput number: ");
scanf("%d", &x);
if(x % 3 == 0 && x != 0)
printf("Number is divisible by 3\n");
else
printf("Number is not divisible by 3\n");
}
return 0;
}