摘要:
110104 LC-DisplayA friend of yours has just bought a new computer. Before this, the most powerful machine he ever used was a pocket calculator. He is a little disappointed because he liked the LCD display of his calculator more than the screen on his new computer! To make him happy, write a program 阅读全文
posted @ 2011-10-23 17:13
mtry
阅读(220)
评论(0)
推荐(0)
摘要:
The 3n+1 problemConsider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. If n is odd, multiply by 3 and add 1. Repeat this process with the new value of n, terminating when n = 1. For example, the following sequence of numbers will be ge 阅读全文
posted @ 2011-10-23 17:01
mtry
阅读(646)
评论(0)
推荐(0)