HDU 4716 A Computer Graphics Problem

题目:http://acm.hrbust.edu.cn/vj/index.php?c=problem-problem&id=475778

代码:

兴爷版:

#include <iostream>
#include<stdio.h>
using namespace std;

int main()
{
    int a,i,j,k;
    cin>>a;
    for(j=1;j<=a;j++)
    {
        cin>>k;
        k=k/10;
        cout<<"Case #"<<j<<":"<<endl;
        cout<<"*------------*"<<endl;
        for(i=1;i<=(10-k);i++)
            cout<<"|............|"<<endl;
        for(i=1;i<=k;i++)
           cout<<"|------------|"<<endl;
        cout<<"*------------*"<<endl;
    }
    return 0;
}


你可能感兴趣的:(HDU 4716 A Computer Graphics Problem)