摘要:
1、编写程序,计算下列分段函数y=f(x)的值。 y= -x+2.5 0<= x <2 y=2-1.5(x-3)(x-3) 2<= x <4 y=x/2-1.5 4<= x <6 1 #include<iostream> 2 using namespace std; 3 4 int main(){ 阅读全文
摘要:
1、 请输入高度h,输入一个高为h,上底边长为h的等腰梯形(例如h=4,图形如下)。 **** ****** ******** ********** 1 #include<iostream> 2 using namespace std; 3 4 int main(){ 5 int h; 6 cout 阅读全文
摘要:
1、 输入任意4个字符(如:abcd),并按反序输出(如:dcba) 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 5 int main(){ 6 7 string str; 8 cout<<"please inpu 阅读全文