Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

What's wrong!~_~

Posted by Alexande at 2006-07-27 20:46:58 on Problem 2876
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator