Question

In: Computer Science

Write a batch file where you will cycle trough colors A0, B0, C0, D0, E0, F0....

Write a batch file where you will cycle trough colors A0, B0, C0, D0, E0, F0. You can use & to execute another command on the same line with a command. Use PAUSE so you may see the results one at a time. After viewing each color, press Spacebar until you cycle through the entire list of colors.

Solutions

Expert Solution

Hello, Student I hope you are doing good and well in this lockdown .

Here is batch code to cycle trough colors A0, B0, C0, D0, E0, F0, if you have any doubt then feel free to ask in comment section , I am always happy to help.

And Please upvote.

Some steps before Magic colors will show : -

1. Make a batch file with any name like: - color.bat

2. Copy my codes into that file and save

3. Run that batch file with Run as administrator

4. Colors are in loop. (Yay!!!)

And if you want to execute one by one then try to execute in command line by applying one by one code.

Batch code:-

@echo off
cls
:loop
echo AO
color 0
timeout /t 2
echo BO
color 1
timeout /t 2
echo CO
color 2
timeout /t 2
echo DO
color 3
timeout /t 2
echo EO
color 4
timeout /t 2
echo FO
color 5
timeout /t 2
goto loop

I have used timout So we can see clearly changes in colors .

Output Screenshots : -

You can use spacebar to see the differents colors .

And feel free to ask in comment section about more modification or explanation .

And Again Please hit that like or thumbs-up button, it really motivates me<3 (It will take only 1-2 seconds)

Thank you!!

Have a nice day:)


Related Solutions

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT