You are on page 1of 2

home / study / engineering / computer science / computer science questions and answers / part 1 - worth 5 points.

using windows batch in com…

Question: Part 1 - Worth 5 points. Using Windows Batch in command pr…


See this question in the app

(2 bookmarks)

Part 1 - Worth 5 points. Using Windows Batch in command prompt. - Call this program program1.bat -
Implement mod by 0 ( nd the remainder), with error trapping, using if and while() commands, How: -
Append your name, current date and time to a NEW le called results.txt - Use a simulated while loop. - If
the user enters the value 999 for the rst or the second number, you must exit the while loop
immediately. - Ask the user to enter the rst number. - Ask the user to enter the second number. - If the
second number is ZERO inform the user and ask for a correct second number. - If the second number is
NOT a zero, do the operation, display all numbers in this computation using labels, and add them to the
results.txt le.
Part 2 - Worth 2.5 points. Using Windows Batch in command prompt. - Call this program program2.bat -
Create a batch le that when executed will display the following. Include a pause between each
command 1 - For the current computer nd the path that is used to search for executable programs. 2 -
Find u.edu's ip address. 3 - Show the active connections in the current computer 4 - Find the routers
used to reach google.com 5 - The IP address of the current computer
Part 3 - Worth 2.5 points. Using Linux Terminal Mode nd: - Call this program program3.sh 1 - For the
current computer nd the path that is used to search for executable programs. 2 - Find u.edu's ip
address. 3 - Show the active connections in the current computer. 4 - Find the routers used to reach
google.com 5 - The IP address of the current computer Submit a zip le named FirstnameLastnameA3.zip
containing the following into the Blackboard dropbox for Assignment 3. - program1.bat - program2.bat -
program3.sh

Expert Answer

Anonymous answered this


Was this answer helpful? 1 1
573 answers

part 1:-

@ echo off
setlocal enabledelayedexpansion
echo results.txt
echo Roberto Martinez >> results.txt
set dt=%date:~7,2%-%date:~4,2%-%date:~10,4%_%time:~0,2%_%time:~3,2%_%time:~6,2%
echo %dt% >> results.txt
goto :main

:main
setlocal
set /p choice1="Enter your rst number"
set /p choice2="Enter your second number"

if !choice1! == 55 goto :eof


if !choice2! == 0 goto :eof
:loop

goto :loop

echo.
echoo ^^

endlocal


View comments (1)

You might also like