2
0
已采纳
给你发一个核心代码:
cout<<3<<endl;
cout<<setw(3)<<a<<endl;
cout<<setw(3)<<b<<endl;
cout<<setw(3)<<c;
这题需要用到一个函数
就是stew函数
stew函数表示一个输出的值向右移动几位
(位数你自己填)
例如这题用stew(3)
也就是向右移动3位输出
还有别忘了头文件
#include<iomanip>
哦~~~~~~~~~~~
最后完美AC
望采纳!!!
希望对你有一定的帮助!!!
0
setw函数
cout<<3<<endl;
cout<<setw(3)<<a<<endl<<setw(3)<<b<<endl<<setw(3)<<c;
别忘了头文件
#include<iomanip>
0
int a,b,c; cin>>a>>b>>c; cout<<3<<endl; cout<<setw(3)<<a<<endl<<setw(3)<<b<<endl<<setw(3)<<c;
头文件:#include<iomanip>
0
0
0