首页 > 其他 > 详细

心理魔术

时间:2019-03-31 23:34:47      阅读:152      评论:0      收藏:0      [点我收藏+]
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
 int i;
 char c,gu;
 srand((unsigned)time(NULL));
 c=6;
 gu=rand()%6+1;
 for (i=1;i<=100;i++)
 {
  c=rand()%31+1;
  if(c>=7&&c<=13);
  c=17;
  if(i%9==0)
   printf("%d.%c\t",i,gu);
  else 
   printf("%d.%c\t",i,c);
  if(i%5==0)
   printf("\n");
 }
 printf("please think of a number in your mind\n"); 
 getchar();
 printf("the answer is:%c",gu);
 return 0;
}

心理魔术

原文:https://www.cnblogs.com/p201821430033/p/10633917.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!