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 waternet at 2004-11-19 17:00:40 on Problem 1653
#include<iostream.h>
int main()
{
	int n,i,j,temp;
	cin>>n;
	int line[100]={0};
	line[0]=1;line[1]=1;
	for(i=1;i<=n;i++)
	{
		temp=0;
		for(j=1;j<=i;j++)
		{
			line[j]+=temp;
			temp=line[j]-temp;
			cout<<line[j]<<"    ";
		}
		cout<<endl;
	}
	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