①②③④原谅我c语言不好

2025-04-05 19:59:16
推荐回答(1个)
回答1:

写两个给你1:
#include
int main()
{
int x,y;

printf("please input x:");

scanf("%d",&x);

if(x>0)

y=x+1;
else if(x<0)
y=x-1;
else
y=x;

printf("y=%d\n",y);
}

3:#include
int main()
{
int x;

printf("please input x:");
scanf("%d",&x);
if((x%3==0)&&(x%5==0)&&(x%7==0))
printf("yes!\n");

else
printf("no!\n");
}