3个回答
展开全部
C/C++语言版,希望有用,敬请采纳 ^_^
#include <stdio.h>
#include <stdlib.h>
void main()
{
int a,b;
printf("please input integer A : ");
scanf("%d", &a);
printf("please input integer B : ");
scanf("%d", &b);
if(a == b)
{
printf("%d is equal with %d, ", a,b);
}
else
{
printf("%d is not equal with %d, ", a,b);
if (a > b)
printf("and %d > %d. \n", a, b);
else
printf("and %d < %d. \n ", a, b);
}
if (a == 0 || b == 0)
return;
if(a % b == 0)
printf("%d can be divided by %d.\n", a, b);
else if (b % a == 0)
printf("%d can be divided by %d.\n", b, a);
else
printf(" %d and %d can not be divided by each other.\n", a, b);
}
#include <stdio.h>
#include <stdlib.h>
void main()
{
int a,b;
printf("please input integer A : ");
scanf("%d", &a);
printf("please input integer B : ");
scanf("%d", &b);
if(a == b)
{
printf("%d is equal with %d, ", a,b);
}
else
{
printf("%d is not equal with %d, ", a,b);
if (a > b)
printf("and %d > %d. \n", a, b);
else
printf("and %d < %d. \n ", a, b);
}
if (a == 0 || b == 0)
return;
if(a % b == 0)
printf("%d can be divided by %d.\n", a, b);
else if (b % a == 0)
printf("%d can be divided by %d.\n", b, a);
else
printf(" %d and %d can not be divided by each other.\n", a, b);
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-03-21
展开全部
是用什么编写?c语言?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询