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

怎么不过呢?

Posted by PC0400322032 at 2004-05-01 04:30:44 on Problem 1653
#include <iostream>
using namespace std;
void main(void)
{
	const max=60;
	int n,k,i,a,b;
	int c[max];
	cin>>n;
	c[1]=1;
	for(k=1;k<=n;k++)
	{
		c[k+1]=1;
		b=0;
		for(i=1;i<=k;i++)
		{
			cout<<c[i]<<' ';
			a=c[i];
			c[i]=b+c[i];
			b=a;					
		}
		cout<<endl;
	}
}

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