) This post is meant to throw out a brick to attract jade; everyone expand your thinking and interactively take part in learning batch files together~ :)
) [Using DOS internal commands to calculate the sum of two floating-point numbers]
Example: Sum.Bat 12.99 438.76
Result: 451.75
Rules: Negative numbers are not considered
Possible errors from deliberately or accidentally entering non-numeric characters are not considered for now
Only DOS internal commands may be used (no DOS version restriction); external commands are forbidden.
Only consider adding the two floating-point numbers appearing in %1 and %2; adding more floating-point numbers is not considered for now.
Allowed number formats: 0.91 0.10 2.12 1092.90
Formats not allowed for now: .91 .9
(Decimal precision: two digits after the decimal point)
Purpose: Broaden thinking, increase interest in batch files, increase everyone’s interactive learning and hands-on playing,
through our continuous interaction, let everyone participate and progress together in the use of batch files :)
Direction: This is only one item; more content needs to be discovered together by netizens, with moderator support :)
Everyone can use any wild idea whatsoever to implement the problem above~ :)
Why this post exists: Only with interaction and everyone participating can one’s own level improve faster.
Turn the way of asking only when encountering problems and not actively learning batch files normally into everyone actively improving together step by step :)
Reward: For excellent solutions and solutions with different lines of thought, the moderators will give godlike guidance and demonstrations,
then give everyone points as encouragement~ :)
Other: Waiting for everyone to have better ideas and very practical topics for interactive learning and application, with everyone participating together :)
===================================
) [Using DOS internal commands to calculate the sum of two floating-point numbers]
Example: Sum.Bat 12.99 438.76
Result: 451.75
Rules: Negative numbers are not considered
Possible errors from deliberately or accidentally entering non-numeric characters are not considered for now
Only DOS internal commands may be used (no DOS version restriction); external commands are forbidden.
Only consider adding the two floating-point numbers appearing in %1 and %2; adding more floating-point numbers is not considered for now.
Allowed number formats: 0.91 0.10 2.12 1092.90
Formats not allowed for now: .91 .9
(Decimal precision: two digits after the decimal point)
Purpose: Broaden thinking, increase interest in batch files, increase everyone’s interactive learning and hands-on playing,
through our continuous interaction, let everyone participate and progress together in the use of batch files :)
Direction: This is only one item; more content needs to be discovered together by netizens, with moderator support :)
Everyone can use any wild idea whatsoever to implement the problem above~ :)
Why this post exists: Only with interaction and everyone participating can one’s own level improve faster.
Turn the way of asking only when encountering problems and not actively learning batch files normally into everyone actively improving together step by step :)
Reward: For excellent solutions and solutions with different lines of thought, the moderators will give godlike guidance and demonstrations,
then give everyone points as encouragement~ :)
Other: Waiting for everyone to have better ideas and very practical topics for interactive learning and application, with everyone participating together :)
===================================
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| vsbat | +1 | 2010-05-30 23:44 |

DigestI