返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.      for(int i=0;i<1000;i++)
  7.    {
  8.    
  9.     cout<<"□□□□□□□□□□"<<endl;   
  10.     cout<<"■□□□□□□□□□"<<endl;
  11.     cout<<"■■□□□□□□□□"<<endl;
  12.     cout<<"■■■□□□□□□□"<<endl;
  13.     cout<<"□■■■□□□□□□"<<endl;
  14.     cout<<"□□■■■□□□□□"<<endl;
  15.     cout<<"□□□■■■□□□□"<<endl;
  16.     cout<<"□□□□■■■□□□"<<endl;
  17.     cout<<"□□□□□■■■□□"<<endl;
  18.     cout<<"□□□□□□■■■□"<<endl;
  19.     cout<<"□□□□□□□■■■"<<endl;
  20.     cout<<"□□□□□□□□■■"<<endl;
  21.     cout<<"□□□□□□□□□■"<<endl;
  22.    }
  23.     system("pause");
  24.     return 0;
  25. }
複製代碼

TOP

  1. [code]#include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.     for(int i=1; i<=65; i++)
  8.     {
  9.          if(i>=1 && i<=5)
  10.              cout<<"□□□□□□□□□□"<<endl;
  11.          if(i>=6 && i<=10)
  12.              cout<<"■□□□□□□□□□"<<endl;
  13.          if(i>=11 && i<=15)
  14.              cout<<"■■□□□□□□□□"<<endl;
  15.          if(i>=16 && i<=20)
  16.              cout<<"■■■□□□□□□□"<<endl;
  17.          if(i>=21 && i<=25)
  18.              cout<<"□■■■□□□□□□"<<endl;
  19.          if(i>=26 && i<=30)
  20.              cout<<"□□■■■□□□□□"<<endl;
  21.          if(i>=31 && i<=35)
  22.              cout<<"□□□■■■□□□□"<<endl;
  23.          if(i>=36 && i<=40)
  24.              cout<<"□□□□■■■□□□"<<endl;
  25.          if(i>=41 && i<=45)
  26.              cout<<"□□□□□■■■□□"<<endl;
  27.          if(i>=46 && i<=50)
  28.              cout<<"□□□□□□■■■□"<<endl;
  29.          if(i>=51 && i<=55)
  30.              cout<<"□□□□□□□■■■"<<endl;
  31.          if(i>=56 && i<=60)
  32.              cout<<"□□□□□□□□■■"<<endl;
  33.          if(i>=61 && i<=65)
  34.              cout<<"□□□□□□□□□■"<<endl;
  35.          system("cls");
  36.     }
  37.     goto re;
  38.     system("pause");
  39.     return 0;
  40. }
複製代碼

TOP

返回列表