#include<stdio.h>
#define SPACE ' '
#define A 6
int big (int a, int b);
void hop (char ch, int num);
int main (void)
{
int a, b;
printf ("please input two number :");
printf ("if you want to quit,please enter q\n");
hop (SPACE, A);
while (scanf("%d,%d",&a,&b) == 2)
{
printf("%d\n",big (a,b)); //或者設一個數=big(a,b)
//也不可以寫成這樣 big (a,b); leser = min;這樣錯誤的,因為主函數不認識第一個式子
printf ("please input two number :");
printf ("if you want to quit,please enter q\n");
}
return 0;
}
void hop (char, int)
{
int count;
for (count=1; count<=A; count++)
printf ("%c",A);
}
int big (int a, int b)
{
int max;
if (a>b)
max = a;
else
max = b;
return max;
}
|