已采纳 邵逸儒 中级天翼 double x,y,k赋值8; 输入x; 如果(x<=3)printf("%.1f\n",k); 如果(x>3) { y赋值(x-3)*2.2+8; printf("%.1f\n",y); } 头文件 #include<iostream> #include<cstdio>