2012年1月6日星期五

QUESTIONG 1 FOR NCRE


 Function fun features are: two to two positive integers a, b ​​merged to form an integer on thec. Combined approach is: to a ten-bit and a digit followed by the thousands on the c and ten, b of ten and you turn on c, one hundred and a bit. For example, when a = 45.b = 12, can get c = 4152
 (函数fun的功能是:把两个两位的正整数a,b合并形成一个整数放在c中。合并方式是:把a的十位和个位数依次放在c 的千位和十位,b的十位和各位依次放在c的百位和个位。例如当a=45.b=12,可得c=4152)




answer: c=(a/10)*1000+(b/10)*100+(a%10)*10+(b%10);
   


  Prepare for the exam is really boring.


没有评论:

发表评论