All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Smallest Number (Posted on 2004-01-25) Difficulty: 3 of 5
Find the smallest number such that if its rightmost digit is placed at its left end, the new number so formed is precisely 50% larger than the original number.

See The Solution Submitted by Ravi Raja    
Rating: 3.7500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): Standard solution | Comment 17 of 24 |
(In reply to re: Standard solution by Ady TZIDON)

10 CLS
20 PRINT "FIMD THE SMALLEST NUMBER SUCH THAT IF ITS RIGHT MOST"
30 PRINT "DIGIT IS PLACED AT ITS LEFT END, THE NEW NUMBER SO"
40 PRINT "FORMED IS PRECISELY FIFTY PERCENT LARGER THAN THE"
50 PRINT "ORIGINAL NUMBER."
60 A = 0: B = 0: C = : D = 1: E = 0: F = 0
120 F = F + 2
121 IF F > 9 THEN F = 0: E=E+1
122 IF E > 9 THEN E = 0: D=D+1123 IF D > 9 THEN D = 0: C=C+1
124 IF C > 9 THEN C = 0: B=B+1
125 IF B > 9 THEN B = 0: A=A+1
126 IF A > 9 THEN 250
130 N1 = A * 100000 + B * 10000 + C * 1000 + D * 100 + E * 10 + F
140 N2 = F * 100000 + A * 10000 + B * 1000 + C * 100 + D * 10 + E
146 REM WAIT &H20, 1
201 REM PRINT USING "# # # # # # # # # # # #"; A; B; C; D; E; F; F; A; B; C; D; E
202 REM PRINT USING "###,###,###,### ###,###,###,###"; N1; N2
222 IF N2 = (N1*.5)+N1 THEN 230 ELSE 120
230 PRINT USING "#,###,### #,###,###"; N1; (N2 * .5) + N2
240 REM PRINT CHR$(12)
250 END

  Posted by Dale on 2004-01-31 10:28:53

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information