从键盘输入10-20之间的三个整数,并输出

#include<stdio.h>

int main(void)

{

       inti=0;

       intarray[3];

       intnum;

       while(i<3)

       {

              printf("inputthe integer number next\n");

              scanf("%d",&num);

              if(num<10||num>20)

                     continue;

              array[i]=num;

              i++;

       }

       for(i=0;i<3;i++)

              printf("the  %d number is %d,",i,array[i]);

       return0;

 

}


posted @ 2013-07-18 13:44  shouqiang Wei  阅读(191)  评论(0编辑  收藏  举报