您的位置:首页 > 编程语言 > C语言/C++

【C++】利用swith语句输出倒三角形

2016-01-05 11:35 281 查看
#include"iostream.h"
#include"stdio.h"

void main()
{
enum Num{one,two,three,four,five};
Num num = five;
switch(num)
{
case five:
cout<<"*********"<<endl;
case four:
cout<<" ******* "<<endl;
case three:
cout<<" ***** "<<endl;
case two:
cout<<" *** "<<endl;
case one:
cout<<" * "<<endl;

}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: