在c语言中,输入两个数,判断两个数的大小关系是大于,小于还是等于,并输出结果

我是c语言新手,呵呵,请赐教

第1个回答  2012-02-20
#include <stdio.h>
#include <stdlib.h>

int main(void) {
int a,b;
scanf("%d %d",&a,&b);
if(a>b)puts("a > b\n");
else if(a == b)puts("a = b\n");
else puts("a < b\n");
return 0;
}本回答被提问者采纳
第2个回答  2012-02-23
#include <stdio.h>
#include <stdlib.h>
main()
{
int a,b;
scanf("%d %d",&a,&b);

if (a>b)
printf("a>b");
else if(a<b)
printf("a<b");
else
printf("a=b");
}
第3个回答  2012-02-21
#include<stdio.h>
int main()
{
float a,b,c;
scanf("%f%f%f",&a,&b,&c);
if(a>b)
printf("a>b");
else if(a<b)
printf("a<b");
else
printf("a=b");
return 0;
}