0
0
已采纳
张睿杰
初级天翼
初级天翼
定义a
cout<< "*"<<endl;
cout<< "**"<<endl;
cout<< "***"<<endl;
cout<< "****"<<endl;
cout<< "***** "<<endl;
cout<< "******"<<endl;
cout<< "*******"<<endl;
刚学c++,用C++来说吧。双引号里面的是字符串 而单引号里面的代表字符 朋友 你可以这样理解 只要是在双引号里面的不代表任何表达式的意义 假如 int a=10 cout<<"a";
这是用 双引号 它在屏幕上就是 a 而 int a=10 cout<<a; 这个a就代表表达式a=10在屏幕上是10 而int a=10 cout<<‘a’;将会是65 因为用单引号里面的代表字符 而字符要用ASCII码 表示
0
0
张马润泽
初级光能
初级光能
cout<<"*"<<endl<<"**"<<endl<<"***"<<endl<<"****"<<endl<<"*****"<<endl<<"******"<<endl<<"*******";
return 0;
一行也行
0
0
王子轩
新手光能
新手光能
cout<<"*\n"; cout<<"**\n"; cout<<"***\n"; cout<<"****\n"; cout<<"*****\n"; cout<<"******\n"; cout<<"*******\n";
0
0
黄俊博
资深光能
资深光能
要加双引号
cout<< "*"<<endl;
cout<< "**"<<endl;
cout<< "***"<<endl;
cout<< "****"<<endl;
cout<< "***** "<<endl;
cout<< "******"<<endl;
cout<< "*******"<<endl;
0
0
0
蒋智航
高级天翼
高级天翼
要加双引号
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"******"<<endl;
cout<<"*******";
0
0
贺晓雨
资深守护
资深守护
cout<< "*"<<endl;
cout<< "**"<<endl;
cout<< "***"<<endl;
cout<< "****"<<endl;
cout<< "*****"<<endl;
cout<< "******"<<endl;
cout<< "*******"<<endl;
0
0
0
姜博麟
初级守护
初级守护
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"******"<<endl;
cout<<"*******"<<endl;
0
费宇晨
新手守护
新手守护
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"******"<<endl;
cout<<"*******"<<endl;
0
0
时梓繁
修练者
修练者
int a; cout<<"*"<<endl; cout<<"**"<<endl; cout<<"***"<<endl; cout<<"****"<<endl; cout<<"*****"<<endl; cout<<"******"<<endl; cout<<"*******"<<endl; return 0; }
0
陆麟瑞
资深天翼
资深天翼
要加引号!
cout<<"*"; cout<<endl; cout<<"**"; cout<<endl; cout<<"***"; cout<<endl; cout<<"****"; cout<<endl; cout<<"*****"; cout<<endl; cout<<"******"; cout<<endl; cout<<"*******"; cout<<endl;
0
邵逸儒
中级天翼
中级天翼
巫桢旺
你少了双引号
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"******"<<endl;
cout<<"*******"<<endl;
0
樊澄宇
新手光能
新手光能
cout<<*<<endl;
cout<<**<<endl;
cout<<***<<endl;
cout<<****<<endl;
cout<<*****<<endl;
cout<<******<<endl;
cout<<*******<<endl;
改成
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"******"<<endl;
cout<<"*******"<<endl;
0