问一个C语言的编程问题~判断一个数n能否同时被3和5整除~

问题描述:

问一个C语言的编程问题~判断一个数n能否同时被3和5整除~

#include
void main()
{
int n;
printf("please input the data:\n");
scanf("%d",&n);
if(n%3==0&&n%5==0)
printf("the %d can be divided by 3 and 5",n);
else
printf("the %d cannot be divided by 3 and 5",n);
return 0;
}