主要是为了理解main()中的指针参量
/*
编写一个通过命令行输入进行运算的程序
*/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(int argc,char ** args)
/*int main()
{
printf("hh");}*/
{
int a = atoi(args[1]);
int b = atoi(args[3]);
char *s = args[2];
char c = s[0];
switch (c) {
case '+':
printf("%d\n", a + b);
break;
case '-':
printf("%d\n", a - b);
break;
case '*':
printf("%d\n", a * b);
break;
case '/':
printf("%d\n", a / b);
break;
default:
printf("error\n");
}
return 0;
}