欢迎光临
我们一直在努力

揭密“不开口算命的就知道你姓啥”

先下载算姓的软件试下准准再看原理:
下载地址:http://www.cbifamily.com/download/128938.htm

原理很简单:排列组合问题。
[hidden]

那位说了,你懂了,咱们还迷糊着呢?说啊,不要急,听我慢慢道来。

把复杂的问题简单化是我教程的特点。那么我们以1到8这8个数字来做为例题讲解。这8位数的您懂了,我写个256个姓氏猜法您也就会了。

1到8数的猜法需要3张卡片,每张卡片上写4个数,它们的写法分别是:

第一张:1,3,5,7

第二张:2,3,6,7

第三张:4,5,6,7

那位说了,你说的是8个数,可是我没看到三张卡片上有8啊?

呵呵,因为我们算的是1到8就8个数字,您在玩这个游戏之前告诉观众,只能猜1到8,如果观众说三张卡片上都没有,那么你就对观众说,他心里想的数字是8!
好了,卡片也做好了,8的问题也解决了,那么我们一个数一个数的详细分析。

计算方法是:
观众心里想的数是:第一张卡片上有就加1,没有就不加,第二张卡片上有就加2,没有也不加,第三张卡片上有,就加4,没有就不加,那么:

从1开始:1只有张一张卡片有,其余没用,所以我就说大家都懂了。

那么2呢:第二张卡片有2,其余没有。

3:第一张卡片上有,第二张卡片上也有所以是1+2

4:只有张三张卡片上有

5:第一张和第三张上有:1+4=5

6:第二张和第四张上有:2+4=6

7:三张卡片上都有:1+2+4=7

8:前面讲解过了。三张卡片都没有就是8。

聪明加用心的朋友已经看出来了,卡片制作的规律,第一张以1开头,每个数字之间的间隔为1,也就是您要猜的数字中所有奇数的数字。

第二张数字以2开头,然后是连续两个数,如2,3再空两个数,接下来是6,7,也就是间隔为2个数,那么接下来的数字是怎么编的呢?即:2,3,6,7,10,11,14,15,18,19,依次类推。

第三张卡片的数字以4开头:还是连续四个数,间隔四个数,再连续四个数,如:4,5,6,7,12,13,14,15,20,21,22,23,依次类推。

聪明用心的朋友,那么第四张卡片、第五张卡片一直一第N张卡片怎么做呢?

第四张以8开头,连续8个数,间隔8个数,再连续,再间隔,依次类推。

第五张以16开头,连续16个数,间隔16个数,再连续,再间隔,依次类推。

第N张以2的(n-1)次方开头,连续“2的(n-1)次方”个数,间隔“2的(n-1)次方”个数,再连续,再间隔,依次类推。

好了,原理懂了,如何算姓呢。如何制作省事呢?

一.首先在网上找到人口数前三百个姓的排名表,作为软件制作的姓数代码表。

因为软件制作要美观,所以把复姓“欧阳”去掉。找出300个姓中的前256个,发现“路”姓重复,有两个“路”去掉了其中一个,发现我身边有许多姓“印”的,而300名中居然没有???所以去掉了一个怪字姓,那个姓都打不出来,改成印。好了256个姓选择完毕。

二.打开word,制作一张12行11列的表,12X11=132可以填入132个数,我们只填128个数字,空4个。

第一张卡片就是往里面填1到255,这128个奇数。这张表格命名为第一张卡片。

把制好的第一张表格复制后,修改里面的数字,使它符合第二张卡片的数字规律排列,命名为第二张卡片。

重复上面的动作做好8张数字卡片。

数字卡片做好后,把这个WORD文档,存盘,存盘后再重命名为姓氏卡片存盘,关掉数字卡片文档,只留姓氏卡片文档,然后利用WORD的替换,全部替换功能,从255这个数字替换为“冷”姓开始,重复255次,呵呵,数字卡片就变成了姓氏卡片了。

为什么先从255这个数字先开始呢?而不是从1开始呢?您亲手试试就知道了!所以必须从255开始换!

三.现在要编程了。

1.第一个问题是程序界面,一定要美观,可惜我不是专业美工,只好用学的一点皮毛PS功夫,做点皮毛手艺。我的办法是,不停地调试PS出来的JPG文件大小,以适合VB程序需求,不断修正,直到感觉合适为止。这里提供大家一个办法,在百度里查看类似的图片,并用这个图片的配色来画您自己的图片,这样基本上就好看了,不象自己靠自己想像出来的图片,配色很难看。

2.具体程序设计说难不难,说不难还有点烦,大家亲手试吧,编程为遇到若干个小问题,只要到百度知道里查一下就有答案了。这一步的难度在于熟能生巧,多编程,问题就会变少。

3.最后给大家一个文本框显示姓氏的子程序代码,就写这一个代码花了我一个小时,最后还没用上,呵呵。

Sub jsxs()
Select Case Val(Xingsu)
Case Is = 1
Label2.Caption = "李"
Case Is = 2
Label2.Caption = "王"
Case Is = 3
Label2.Caption = "张"
Case Is = 4
Label2.Caption = "刘"
Case Is = 5
Label2.Caption = "陈"
Case Is = 6
Label2.Caption = "杨"
Case Is = 7
Label2.Caption = "赵"
Case Is = 8
Label2.Caption = "黄"
Case Is = 9
Label2.Caption = "周"
Case Is = 10
Label2.Caption = "吴"
Case Is = 11
Label2.Caption = "徐"
Case Is = 12
Label2.Caption = "孙"
Case Is = 13
Label2.Caption = "胡"
Case Is = 14
Label2.Caption = "朱"
Case Is = 15
Label2.Caption = "高"
Case Is = 16
Label2.Caption = "林"
Case Is = 17
Label2.Caption = "何"
Case Is = 18
Label2.Caption = "郭"
Case Is = 19
Label2.Caption = "马"
Case Is = 20
Label2.Caption = "罗"
Case Is = 21
Label2.Caption = "梁"
Case Is = 22
Label2.Caption = "宋"
Case Is = 23
Label2.Caption = "郑"
Case Is = 24
Label2.Caption = "谢"
Case Is = 25
Label2.Caption = "韩"
Case Is = 26
Label2.Caption = "唐"
Case Is = 27
Label2.Caption = "冯"
Case Is = 28
Label2.Caption = "于"
Case Is = 29
Label2.Caption = "董"
Case Is = 30
Label2.Caption = "萧"
Case Is = 31
Label2.Caption = "程"
Case Is = 32
Label2.Caption = "曹"
Case Is = 33
Label2.Caption = "袁"
Case Is = 34
Label2.Caption = "邓"
Case Is = 35
Label2.Caption = "许"
Case Is = 36
Label2.Caption = "傅"
Case Is = 37
Label2.Caption = "沈"
Case Is = 38
Label2.Caption = "曾"
Case Is = 39
Label2.Caption = "彭"
Case Is = 40
Label2.Caption = "吕"
Case Is = 41
Label2.Caption = "苏"
Case Is = 42
Label2.Caption = "卢"
Case Is = 43
Label2.Caption = "蒋"
Case Is = 44
Label2.Caption = "蔡"
Case Is = 45
Label2.Caption = "贾"
Case Is = 46
Label2.Caption = "丁"
Case Is = 47
Label2.Caption = "魏"
Case Is = 48
Label2.Caption = "薛"
Case Is = 49
Label2.Caption = "叶"
Case Is = 50
Label2.Caption = "阎"
Case Is = 51
Label2.Caption = "余"
Case Is = 52
Label2.Caption = "潘"
Case Is = 53
Label2.Caption = "杜"
Case Is = 54
Label2.Caption = "戴"
Case Is = 55
Label2.Caption = "夏"
Case Is = 56
Label2.Caption = "锺"
Case Is = 57
Label2.Caption = "汪"
Case Is = 58
Label2.Caption = "田"
Case Is = 59
Label2.Caption = "任"
Case Is = 60
Label2.Caption = "姜"
Case Is = 61
Label2.Caption = "范"
Case Is = 62
Label2.Caption = "方"
Case Is = 63
Label2.Caption = "石"
Case Is = 64
Label2.Caption = "姚"
Case Is = 65
Label2.Caption = "谭"
Case Is = 66
Label2.Caption = "廖"
Case Is = 67
Label2.Caption = "邹"
Case Is = 68
Label2.Caption = "熊"
Case Is = 69
Label2.Caption = "金"
Case Is = 70
Label2.Caption = "陆"
Case Is = 71
Label2.Caption = "郝"
Case Is = 72
Label2.Caption = "孔"
Case Is = 73
Label2.Caption = "白"
Case Is = 74
Label2.Caption = "崔"
Case Is = 75
Label2.Caption = "康"
Case Is = 76
Label2.Caption = "毛"
Case Is = 77
Label2.Caption = "邱"
Case Is = 78
Label2.Caption = "秦"
Case Is = 79
Label2.Caption = "江"
Case Is = 80
Label2.Caption = "史"
Case Is = 81
Label2.Caption = "顾"
Case Is = 82
Label2.Caption = "侯"
Case Is = 83
Label2.Caption = "邵"
Case Is = 84
Label2.Caption = "孟"
Case Is = 85
Label2.Caption = "龙"
Case Is = 86
Label2.Caption = "万"
Case Is = 87
Label2.Caption = "段"
Case Is = 88
Label2.Caption = "雷"
Case Is = 89
Label2.Caption = "钱"
Case Is = 90
Label2.Caption = "汤"
Case Is = 91
Label2.Caption = "尹"
Case Is = 92
Label2.Caption = "黎"
Case Is = 93
Label2.Caption = "易"
Case Is = 94
Label2.Caption = "常"
Case Is = 95
Label2.Caption = "武"
Case Is = 96
Label2.Caption = "乔"
Case Is = 97
Label2.Caption = "贺"
Case Is = 98
Label2.Caption = "赖"
Case Is = 99
Label2.Caption = "龚"
Case Is = 100
Label2.Caption = "文"
Case Is = 101
Label2.Caption = "庞"
Case Is = 102
Label2.Caption = "樊"
Case Is = 103
Label2.Caption = "兰"
Case Is = 104
Label2.Caption = "殷"
Case Is = 105
Label2.Caption = "施"
Case Is = 106
Label2.Caption = "陶"
Case Is = 107
Label2.Caption = "洪"
Case Is = 108
Label2.Caption = "翟"
Case Is = 109
Label2.Caption = "安"
Case Is = 110
Label2.Caption = "颜"
Case Is = 111
Label2.Caption = "倪"
Case Is = 112
Label2.Caption = "严"
Case Is = 113
Label2.Caption = "牛"
Case Is = 114
Label2.Caption = "温"
Case Is = 115
Label2.Caption = "芦"
Case Is = 116
Label2.Caption = "季"
Case Is = 117
Label2.Caption = "俞"
Case Is = 118
Label2.Caption = "章"
Case Is = 119
Label2.Caption = "鲁"
Case Is = 120
Label2.Caption = "葛"
Case Is = 121
Label2.Caption = "伍"
Case Is = 122
Label2.Caption = "韦"
Case Is = 123
Label2.Caption = "申"
Case Is = 124
Label2.Caption = "尤"
Case Is = 125
Label2.Caption = "毕"
Case Is = 126
Label2.Caption = "聂"
Case Is = 127
Label2.Caption = "丛"
Case Is = 128
Label2.Caption = "焦"
Case Is = 129
Label2.Caption = "向"
Case Is = 130
Label2.Caption = "柳"
Case Is = 131
Label2.Caption = "邢"
Case Is = 132
Label2.Caption = "路"
Case Is = 133
Label2.Caption = "岳"
Case Is = 134
Label2.Caption = "齐"
Case Is = 135
Label2.Caption = "沿"
Case Is = 136
Label2.Caption = "梅"
Case Is = 137
Label2.Caption = "莫"
Case Is = 138
Label2.Caption = "庄"
Case Is = 139
Label2.Caption = "辛"
Case Is = 140
Label2.Caption = "管"
Case Is = 141
Label2.Caption = "祝"
Case Is = 142
Label2.Caption = "左"
Case Is = 143
Label2.Caption = "涂"
Case Is = 144
Label2.Caption = "谷"
Case Is = 145
Label2.Caption = "祁"
Case Is = 146
Label2.Caption = "时"
Case Is = 147
Label2.Caption = "舒"
Case Is = 148
Label2.Caption = "耿"
Case Is = 149
Label2.Caption = "牟"
Case Is = 150
Label2.Caption = "卜"
Case Is = 151
Label2.Caption = "鹿"
Case Is = 152
Label2.Caption = "詹"
Case Is = 153
Label2.Caption = "关"
Case Is = 154
Label2.Caption = "苗"
Case Is = 155
Label2.Caption = "凌"
Case Is = 156
Label2.Caption = "费"
Case Is = 157
Label2.Caption = "纪"
Case Is = 158
Label2.Caption = "靳"
Case Is = 159
Label2.Caption = "盛"
Case Is = 160
Label2.Caption = "童"
Case Is = 161
Label2.Caption = "欧"
Case Is = 162
Label2.Caption = "甄"
Case Is = 163
Label2.Caption = "项"
Case Is = 164
Label2.Caption = "曲"
Case Is = 165
Label2.Caption = "成"
Case Is = 166
Label2.Caption = "游"
Case Is = 167
Label2.Caption = "阳"
Case Is = 168
Label2.Caption = "裴"
Case Is = 169
Label2.Caption = "席"
Case Is = 170
Label2.Caption = "卫"
Case Is = 171
Label2.Caption = "查"
Case Is = 172
Label2.Caption = "屈"
Case Is = 173
Label2.Caption = "鲍"
Case Is = 174
Label2.Caption = "位"
Case Is = 175
Label2.Caption = "覃"
Case Is = 176
Label2.Caption = "霍"
Case Is = 177
Label2.Caption = "翁"
Case Is = 178
Label2.Caption = "隋"
Case Is = 179
Label2.Caption = "植"
Case Is = 180
Label2.Caption = "甘"
Case Is = 181
Label2.Caption = "景"
Case Is = 182
Label2.Caption = "薄"
Case Is = 183
Label2.Caption = "单"
Case Is = 184
Label2.Caption = "包"
Case Is = 185
Label2.Caption = "司"
Case Is = 186
Label2.Caption = "柏"
Case Is = 187
Label2.Caption = "宁"
Case Is = 188
Label2.Caption = "柯"
Case Is = 189
Label2.Caption = "阮"
Case Is = 190
Label2.Caption = "桂"
Case Is = 191
Label2.Caption = "闵"
Case Is = 192
Label2.Caption = "虞"
Case Is = 193
Label2.Caption = "解"
Case Is = 194
Label2.Caption = "强"
Case Is = 195
Label2.Caption = "柴"
Case Is = 196
Label2.Caption = "华"
Case Is = 197
Label2.Caption = "车"
Case Is = 198
Label2.Caption = "冉"
Case Is = 199
Label2.Caption = "房"
Case Is = 200
Label2.Caption = "边"
Case Is = 201
Label2.Caption = "辜"
Case Is = 202
Label2.Caption = "吉"
Case Is = 203
Label2.Caption = "饶"
Case Is = 204
Label2.Caption = "刁"
Case Is = 205
Label2.Caption = "瞿"
Case Is = 206
Label2.Caption = "戚"
Case Is = 207
Label2.Caption = "丘"
Case Is = 208
Label2.Caption = "古"
Case Is = 209
Label2.Caption = "米"
Case Is = 210
Label2.Caption = "池"
Case Is = 211
Label2.Caption = "滕"
Case Is = 212
Label2.Caption = "晋"
Case Is = 213
Label2.Caption = "苑"
Case Is = 214
Label2.Caption = "邬"
Case Is = 215
Label2.Caption = "臧"
Case Is = 216
Label2.Caption = "畅"
Case Is = 217
Label2.Caption = "宫"
Case Is = 218
Label2.Caption = "来"
Case Is = 219
Label2.Caption = "印"
Case Is = 220
Label2.Caption = "苟"
Case Is = 221
Label2.Caption = "全"
Case Is = 222
Label2.Caption = "褚"
Case Is = 223
Label2.Caption = "廉"
Case Is = 224
Label2.Caption = "简"
Case Is = 225
Label2.Caption = "娄"
Case Is = 226
Label2.Caption = "盖"
Case Is = 227
Label2.Caption = "符"
Case Is = 228
Label2.Caption = "奚"
Case Is = 229
Label2.Caption = "木"
Case Is = 230
Label2.Caption = "穆"
Case Is = 231
Label2.Caption = "党"
Case Is = 232
Label2.Caption = "燕"
Case Is = 233
Label2.Caption = "郎"
Case Is = 234
Label2.Caption = "邸"
Case Is = 235
Label2.Caption = "冀"
Case Is = 236
Label2.Caption = "谈"
Case Is = 237
Label2.Caption = "姬"
Case Is = 238
Label2.Caption = "屠"
Case Is = 239
Label2.Caption = "连"
Case Is = 240
Label2.Caption = "郜"
Case Is = 241
Label2.Caption = "晏"
Case Is = 242
Label2.Caption = "栾"
Case Is = 243
Label2.Caption = "郁"
Case Is = 244
Label2.Caption = "商"
Case Is = 245
Label2.Caption = "蒙"
Case Is = 246
Label2.Caption = "计"
Case Is = 247
Label2.Caption = "喻"
Case Is = 248
Label2.Caption = "揭"
Case Is = 249
Label2.Caption = "窦"
Case Is = 250
Label2.Caption = "迟"
Case Is = 251
Label2.Caption = "宇"
Case Is = 252
Label2.Caption = "敖"
Case Is = 253
Label2.Caption = "糜"
Case Is = 254
Label2.Caption = "鄢"
Case Is = 255
Label2.Caption = "冷"
End Select
End Sub

[/hidden]

赞(0) 打赏
未经允许不得转载:新席地网博客 » 揭密“不开口算命的就知道你姓啥”
分享到: 更多 (0)
标签:

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  • Q Q(选填)

新席地网-苏州网站制作,360度全景摄影,微信小程序营销推广,抖音运营推广

QQ :13945502电话:17895058839

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮