第1个回答 2012-06-20
是输出较小的数吗?
#include<stdio.h>
main()
{
int a,b;
printf ("请输入两个整数:");
scanf("%d,%d",&a,&b);
if(a<b)
printf("较小的数是%d",a);
else
printf("较小的数是%d",b);
}
第2个回答 2012-06-20
#include <stdio.h>
#include <stdlib.h>
int main()
{
int max(int x,int y);
int a,b,c;
scanf("%d%d",&a,&b);
c=max(a,b);
printf("%d",c);
system("pause");
}
int max(int x, int y)
{
int z;
if (x>y) z=x;
else z=y;
return (z);
}