标签:分类 space 统一 blog ace input 一个 proc cout
0 65
+-----+ | E| | | | | | | | | +-----+ +-----+ |- 3G| |-- | |--- | | | | | +-----+
这题简单,仔细分类就成了;
1 #include <iostream> //1005 2 using namespace std; 3 int main(){ 4 int a; 5 while(cin>>a){ 6 int b=a/10; 7 cout<<"+-----+"<<endl; 8 if(b>=9){ 9 cout<<"|- 4G|"<<endl; 10 }else if(b>=6){ 11 cout<<"|- 3G|"<<endl; 12 }else if(b>=2){ 13 cout<<"|- E|"<<endl; 14 }else{ 15 cout<<"| E|"<<endl; 16 } 17 if(b>=4) 18 cout<<"|-- |"<<endl; 19 else 20 cout<<"| |"<<endl; 21 if(b>=6) 22 cout<<"|--- |"<<endl; 23 else 24 cout<<"| |"<<endl; 25 if(b>=8) 26 cout<<"|---- |"<<endl; 27 else 28 cout<<"| |"<<endl; 29 if(b==10) 30 cout<<"|-----|"<<endl; 31 else 32 cout<<"| |"<<endl; 33 cout<<"+-----+"<<endl; 34 } 35 36 return 0; 37 }
标签:分类 space 统一 blog ace input 一个 proc cout
原文地址:http://www.cnblogs.com/zllwxm123/p/7260349.html