c语言输出如何改成C++的输出
printf("a[i]>b[i]%dtimes\na[i]=b[i]%dtimes\na[i]<b[i]%dtimes\n",n,m,k);改成cout语句...
printf("a[i]>b[i] %d times\na[i]=b[i] %d times\na[i]<b[i] %d times\n",n,m,k);
改成cout 语句 展开
改成cout 语句 展开
展开全部
cout << "a[i]>b[i] " << n << " times" << endl;
cout << "a[i]=b[i] " << m << " times" << endl;
cout << "a[i]<b[i] " << k << " times" << endl;
c++中就这样吧,我也不知道有没有更好的方法,c++中好像没有占位符一说,c++中的格式化输出也比较复杂
cout << "a[i]=b[i] " << m << " times" << endl;
cout << "a[i]<b[i] " << k << " times" << endl;
c++中就这样吧,我也不知道有没有更好的方法,c++中好像没有占位符一说,c++中的格式化输出也比较复杂
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
cout<<"a[i]>b[i]"<<n<<"times"<<endl;
cout<<"a[i]=b[i]"<<m<<"times"<<endl;
cout<<"a[i]<b[i]"<<k<<"times"<<endl;
cout<<"a[i]=b[i]"<<m<<"times"<<endl;
cout<<"a[i]<b[i]"<<k<<"times"<<endl;
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
cout<<"a[i]>b[i]"<<n<<"times"<<endl<<"a[i]=b[i]"<<m<<"times"<<endl<<"a[i]<b[i]"<<k<<" times"<<endl;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
cout<<a[i]>b[i]<<n<<"times"<<endl;
cout<<a[i]=b[i]<<m<<times<<endl;
cout<<a[i]<b[i]<<k<<times<<endl;
cout<<a[i]=b[i]<<m<<times<<endl;
cout<<a[i]<b[i]<<k<<times<<endl;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
cout<<"a[i]>b[i]"<<n<<"times\na[i]=b[i]"<<m<<"times\na[i]<b[i]"<<k<<"times\n";
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询