![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 20:41 |
47,811 topics / 349,897 posts / today 2 new / 48,255 members |
| DOS批处理 & 脚本技术(批处理室) » [Numerical Calculation]Square roots of integers from 1 to 99 |
| Printable Version 2,050 / 4 |
| Floor1 523066680 | Posted 2008-09-20 17:25 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
Also published on bathome
http://bbs.bathome.cn/viewthread.php?tid=1791&page=1&extra=page%3D1 If there are decimals, keep 3 decimal places. [ Last edited by 523066680 on 2008-9-21 at 07:29 AM ] |
|
| Floor2 lxmxn | Posted 2008-09-21 09:08 |
| 版主 Posts 4,938 Credits 11,386 | |
|
That's good, it has been collected into the top-sticked Classic Thread Classification Index in Batch Processing Room.
|
|
| Floor3 BC | Posted 2008-09-21 09:12 |
| 中级用户 Posts 175 Credits 338 | |
|
Take a seat...
|
|
| Floor4 523066680 | Posted 2008-09-21 09:18 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
Principle: Compare digit by digit. For example, input 2.
0*0=0 1*1=1 2*2=4 4>2 so the first digit is 1. Then 1.1*1.1 1.2*1.2 1.3*1.3…… 1.4*1.4 1.5*1.5 = 2.25 >2 so take 1.4 And so on. Everyone is puzzled: Batch processing has no decimals. Then calculate with integers, and then add a decimal point to it. |
|
| Floor5 523066680 | Posted 2008-09-21 09:25 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
Thanks for everyone's support! I love cn-dos!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |