c语言的题,有会的一定来呀

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:24:44
显示如下:
*************
1.sin(x)
2.cos(x)
3.tan(x)
4.sqtr(x)
5.exit
Please choose(1-5)

非常之不明白你问什么

#include<stdio.h>
main()
{
int i;
printf("please input a number between 1 - 5:");
scanf("%d",&i);
switch(i)
{
case 1 : printf("sin(x)\n"); break;
case 2 : printf("cos(x)\n"); break;
case 3 : printf("tan(x)\n"); break;
case 4 : printf("sqrt(x)\n"); break;
case 5 : printf("exit\n"); break;
default : break;
}
getch();
}