2013=7=15

新的一天,新的开始。一定要努力。

http://user.qzone.qq.com/549838127/infocenter#!app=2&via=QZ.HashRefresh&pos=1340283507

#include<stdio.h>

int main(void)

{  int x,n,apple;  

printf("提示:游戏中可以按回车键继续 ");       getchar();

 printf("您好,我是一个魔术程序,可以猜到您的所思所想。 ");    getchar();

 printf("您不相信吗?那我们来玩一个游戏吧。 ");        getchar();  

printf("现在,请您打开您电脑的记事本。 ");         getchar();

 printf("然后随便想一个九位数以内的正整数,记在记事本上。");

 printf("数值标记为“x”,位数标记为n。 例如:x=1234,n=4。 ");    getchar();

 printf("现在把x的每一位数都变成6,在数字的头和尾分别加上“1”和“7”。");  

printf("把这个数值记为a。 例如:a=166667。 ");  getchar();  

printf("现在,请在百度搜索栏里输入“x*a”的算式");

 printf(",百度一下,把结果的最后n位数告诉我。 例如:7078。 ");

 printf("请输入最后n位数的值->");

 scanf("%d",&x);  getchar();

 apple=x;

 for(n=10;   apple=(apple-apple%10)/10;   n*=10);

 printf(" 让我想想哈……(请按回车键) ");           getchar();

 printf("你记在记事本上的数是%d,我猜对了吧!^-^",(x*3)%n);         getchar();

 return 0;

}

原文地址:https://www.cnblogs.com/wc1903036673/p/3190470.html