设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 1840|回复: 0
打印 上一主题 下一主题

不知道两个的结果是什么,怎么会这样呢

[复制链接]
跳转到指定楼层
1#
发表于 2009-11-3 02:14:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#include<stdio.h>
void main()
{
long a[]={5,10,10,10,11,12,13,5,5,5,10,20,20,10,10,10,10,10,10,10,20,20,20,60,50,20,20,40,40,40,30,30,20,20,20,20,20,40,40,40,20,20,40,20,20,20,20,40,40,40,20,20,20,20,20,20,20,40,40,40,10,20,50,20,20,20,60,67,40,40,20,10,50,20,20,107,60,20,20,10,10,127,40,40,40,20,10,10,10,10,40,40,40,20,20,20,20,20,20,100};
int i=0,j,k=1,m;
long z[100];
for(i=0;i<100;i++)
{
printf("%6d",a[i]);
if((i+1)%10==0)
printf("\n");
}
printf("\n\n\n\n\n");

for(m=0;m<100;m++)
{
if(m==0)
z[m] = a[m];
else
z[m] = a[m] - a[m-1];

printf("%6d",z[m]);
if((m+1)%10==0)
printf("\n");
}
printf("\n\n\n\n\n");

for(i=0;i<100;i++)
{
if((i+1)%10==0)
k++;
if(i<10)
j = i+1;
else
if(i%10==9)
j = i+1-(k-2)*10;
else

j = i+1-(k-1)*10;
if(z[i+1] != z[i])
{
printf("(%d,%d)",z[i],j);
printf(" ");
if(j==10)
printf("\n");
}
}
}
#include<stdio.h>
void main()
{
long a[][2]={{5,2},{0,4},{1,7},{-8,8},{0,10},{10,2},{0,3},{-10,4},{0,10},{20,1},{0,3},{40,4},{-10,5},{-30,6},{0,7},{20,8},{0,10},{30,1},{0,2},{-10,3},{0,7},{20,8},{0,10},{20,1},{0,2},{20,3},{-20,4},{0,7},{20,8},{0,10},{20,1},{0,7},{20,8},{0,10},{10,2},{30
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 02:22 , Processed in 0.107281 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表