#include <stdio.h>
int priority(char x) {
switch(x) {
case '+':
case '-':
return 0;
case '*':
case '/':
return 1;
default:
return 2;
}
return 0;
}
int main(char argc,char *argv[]) {
char *say = "Hello, ";
priority('+');
if (argc>1)
printf("%s, %s!\n", say, argv[1]);
else
printf("%s, guy!\n", say);
}
沒有留言:
張貼留言