- /*
- y=x (x<1)
- y=2*x-1 (1<=x<10)
- y=3*x-11 (x>=10)
- */
- #include <stdio.h>
- #include <math.h>
- void main()
- {
- int a,b;
- printf("请输入1个数:");
- scanf("%d",&a);
- if (a<1){
- b = a;
- }else if(a<10 && a>=1){
- b = 2*a-1;
- }else{
- b = 3*a-11;
- }
- printf("方程的值是:%d/n",b);
- }
c语言:求方程组的解(if的使用)
最新推荐文章于 2022-11-22 00:44:11 发布