c语言for循环

#include<stdio.h>
#include<windows.h>
#include <limits.h>
#include <math.h>
void isyes()
{
    int num;
    scanf("%d",&num);
    switch(num)
    {
    case 28:
        {
            printf("彩票号码为%d,恭喜,你中了一等奖\n",num);
            break;
        }
    case 16:
        {
            printf("您中了二等奖");
            break;

        }
    default:
        {
            printf("你没有中奖");
        }


    }

}
int main(void)
{
    
    int i;
    printf("请输入彩票号码:");
    
    for(i=1;i<=10000;i++)
    {
        isyes();

    }
    
    getchar();
    getchar();


    return 0;

}

posted @ 2015-04-22 08:49  田园沃土  阅读(140)  评论(0编辑  收藏  举报