Differences between revisions 11 and 12
Revision 11 as of 2006-06-05 17:24:48
Size: 321
Editor: yongshunz
Comment:
Revision 12 as of 2006-06-05 17:31:41
Size: 372
Editor: yongshunz
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
  a=0
  while a<100:
  a=a+1
  print a
      1 a=0
      2 while a<100:
      3 a=a+1
      4 print a
Line 10: Line 10:
  这样看起来可以个C中的  . 这样看起来可以个C中的
Line 12: Line 12:
  for(i=0;i<100;i++)
  print i
}}}
一样
   1 for(i=0;i<100;i++)
   2 {printf("%d",i);}

}}}
一样

Q:怎么样才能写成++x,x++那样

顺便说一句,下面程序里的行号并不是程序的一部分,任何与 BASIC 类似的东西都是站不住脚的

      1 a=0
      2 while a<100:
      3     a=a+1
      4     print a
  • 这样看起来可以个C中的

   1 for(i=0;i<100;i++)
   2 {printf("%d",i);}
  • 一样

PyIAQ/Q4 (last edited 2009-12-25 07:09:52 by localhost)