break-test

as the program say:

break_test.c

#include<stdio.h>
  
int main(int argc, char *argv[])
{
          int square, i;
          for(i = 1; i <= 100; i++)
          {
                  square = i * i;
                  if(square > 100)
                          break;
                  printf("%d * %d = %d\n ",i, i, square);
          }
          printf("But, i want to sprintf 1*1~10*10, beacause of break, so, it go out advance.....\n");
}
   
Makefile

   make  :  
           gcc -o break_test break_test.c
   clean : 
           rm -rf break_test
 
The Results:

[root@localhost break_test]# ./swit_test 
1 * 1 = 1
 2 * 2 = 4
 3 * 3 = 9
 4 * 4 = 16
 5 * 5 = 25
 6 * 6 = 36
 7 * 7 = 49
 8 * 8 = 64
 9 * 9 = 81
 10 * 10 = 100
 But, i want to sprintf 1*1~10*10, beacause of break, so, it go out advance.....

Now, i did not thought it can do sth, so , it's just test!


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值