判断一个数能否被3,5同时整{ 请问为什么打错了c++}

#include
#include
using namespace std;
int main()
{
float n;
scanf("%f",&n);
if(n%15==0)
printf("YES");
else
printf("NO");
return 0;
}

float n;
scanf("%f",&n);
->
int n;
scanf("%d",&n);

浮点数相除没有什么整除的概念。需要用整数

浮点数是不能整除%的哦,只有整数才可以