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

Re:123456

Posted by thincal at 2004-04-24 10:53:12 on Problem 1653
In Reply To:123456 Posted by:090301528 at 2003-12-24 11:28:23
> #include <stdio.h>
> #include <math.h>
> void main(){
> 	int a[11][11],i,j,n;
> 	scanf("%d",&n);
> 	a[1][1]=1;
> 	for(j=0;j<n;j++){
> 		a[j][0]=0;
> 	    for(i=j+1;i<11;i++)a[j][i]=0;
> 	}
> 	for(j=2;j<=n;j++)
> 		for(i=1;i<j+1;i++)
> 			a[j][i]=a[j-1][i-1]+a[j-1][i];
> 		for(j=1;j<=n;j++){
> 			for(i=1;i<=j;i++)printf("%d ",a[j][i]);
> 			printf("\n");
> 		}
> }

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