心理魔术

// 心理魔术.cpp : Defines the entry point for the application.
//

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

int main()
{
int i;
char c,gu;
srand((unsigned)time(NULL));

c=3;
gu=rand()%6+1;
for(i=1;i<=100;i++)
{
c=rand()%19+1;
if(c<=13&&c>=7)
c=5;

if(i%9==0)
printf("%d.%c\t",i,gu);
else
printf("%d.%c\t",i,c);
if(i%5==0)
printf("\n");
}
getchar();
printf("the icon you guess is:%c\n",gu);

return 0;
}

 

posted on 2019-03-23 15:35  甄珍123  阅读(182)  评论(0编辑  收藏  举报

导航