返回列表 發帖
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
    re:
    for(int i=1; i<=80; i++)
    {
        if(i<=20)
            cout<<"歡";
        else if(i>21 && i<=40)
            cout<<"  迎";
        else if(i>41 && i<=60)
            cout<<"    光";
        else
            cout<<"      臨";
        system("cls");
    }
    for(int i=1; i<=80; i++)
    {
        if(i<=20)
            cout<<"歡";
        else if(i>21 && i<=40)
            cout<<"歡迎";
        else if(i>41 && i<=60)
            cout<<"歡迎光";
        else
            cout<<"歡迎光臨";
        system("cls");
    }
    for(int i=1; i<=140; i++)
    {
        if(i<=20)
            cout<<"";
        else if(i>21 && i<=40)
            cout<<"歡迎光臨";
        else if(i>41 && i<=60)
            cout<<"";
        else if(i>61 && i<=80)
            cout<<"歡迎光臨";
        else if(i>81 && i<=100)
            cout<<"";
        else if(i>101 && i<=120)
            cout<<"歡迎光臨";
        else
            cout<<"";
        system("cls");
    }
    goto re;        
    system("pause");
    return 0;
}

TOP

返回列表