| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
What's wrong!~_~#include <stdio.h>
#include <math.h>
void OutPut(int n)
{
if(n==0)
printf("_");
else if(n==1)
printf("_ _");
else
{
OutPut(n-1);
for(int i=0;i<pow(3,n-1);i++)
printf(" ");
OutPut(n-1);
}
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
OutPut(n);
printf("\n");
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator