> 其他 >
问一个C语言的编程问题~判断一个数n能否同时被3和5整除~
人气:168 ℃ 时间:2019-10-18 02:56:27
解答
#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;
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版