作业2

// 22.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "stdlib.h"
#include "stdio.h"
#include "time.h"

 


int main(int argc, char* argv[])
{int i;
char c,gu;
srand((unsigned)time(NULL));
c=6;
gu=rand()%16+32;
for(i=1;i<=100;i++)
{
c=rand()%79+48;
if(c>=7&&c<=13)
c=17;
if(i&9==0)
printf("%d.%c\t",i,gu);
else
printf("%d.%c\t",i,c);6
if(i%5==0)
printf("\n");
}

getchar();
printf("the icon you guess is:\n");
for(i=1;i<=10;i++)
printf("%c ",gu);
printf("\n");
return 0;
}

posted @ 2019-03-27 21:18  望天╭(°A°`)╮  阅读(98)  评论(0编辑  收藏  举报