1 solutions
-
0
C :
#include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF) { int i,j,k; i=n/10; j=10-i; printf("*------------*\n"); for(k=0;k<j;k++) printf("|............|\n"); for(k=0;k<i;k++) printf("|------------|\n"); printf("*------------*\n\n"); } }C++ :
#include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> using namespace std; int main() { int t,x; int i; while(scanf("%d",&x)!=EOF) { printf("*------------*\n"); for(i=0;i<10-x/10;i++) printf("|............|\n"); for(i=0;i<x/10;i++) printf("|------------|\n"); printf("*------------*\n"); printf("\n"); } return 0; }
- 1
Information
- ID
- 16825
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By