c how to program 习题2.26

发布于2020-03-12 807 热度

//c how to program 习题2.26
#include <stdio.h>

int main(void)
{
	int x, y;
	printf("请输入两个整数:");
	scanf("%d%d", &x, &y);
	if(x%y == 0){
		printf("%d是%d的倍数\n", x, y);
		printf("%d是%d的%d倍\n", x, y, x / y);
	}
	if(x%y != 0){
		printf("%d不是%d的倍数\n", x, y);
	}
}

记录工作,记录学习,分享知识,分享经验……