| ||||||||||
| 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 | |||||||||
为什么是Presentation Error呀,运行也正确呀,帮帮忙呀!!!!!!#include<stdio.h>
#include<math.h>
void main ()
{
int n,i,j,a[100][100],p,q;
scanf("%d",&n);
for(i=1;i<=n;i++)
a[i][1]=a[i][i]=1;
for(i=3;i<=n;i++)
for(j=2;j<i;j++)
a[i][j]=a[i-1][j-1]+a[i-1][j];
for(p=1;p<=n;p++)
{ for(q=1;q<=p;q++)
printf("%d ",a[p][q]);
printf("\n");
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator