| ||||||||||
| 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 | |||||||||
Re:帮忙看看吧!我都不知道那里错了哦!刚才按错了,这个才是!!谢谢了!!!In Reply To:Re:帮忙看看吧!我都不知道那里错了哦!刚才按错了,这个才是!!谢谢了!!! Posted by:90401307 at 2005-01-07 14:16:20 > #include<stdio.h>
> void main(){
> int num[16],i,j,dl=0,m;
> scanf("%d",&num[1]);
> while(num[1]!=-1){
> for(i=2;i<=15;i++){
> if(num[i-1]!=0){
> scanf("%d",&num[i]);
> }
> else if(num[i-1]==0)
> break;
> }
> m=i-1;
> for(i=1;i<m;i++){
> for(j=1;j<m;j++){
> if(num[i]==2*num[j])
> dl++;
> }
> }
> printf("%d\n",dl);
> dl=0;
> scanf("%d",&num[1]);
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator