anonymous
  • anonymous
** BETA TESTING ** I want some people to test a program I wrote for another person on here. beware it only works on windows and i am not really a programmer
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
@echo off :: Take X Y and Z and output the largest odd number script by EMOTICON :D :: BTW I'm not really a computer programmer, but this does work :3 :: This program does not behave properly if spaces are entered in the prompts :: This program DOES behave properly by ignoring strings though :: Ask for user input. set /p x="What is X? " set /p y="What is Y? " set /p z="What is Z? " :: Check odd numbers set /a modulo = "%x% %% 2" if %modulo% == 0 ( set xo=false ) else ( set xo=true ) set /a modulo = "%y% %% 2" if %modulo% == 0 ( set yo=false ) else ( set yo=true ) set /a modulo = "%z% %% 2" if %modulo% == 0 ( set zo=false ) else ( set zo=true ) :: find largest number if %xo%==true echo "%x%">Num.temp if %yo%==true echo "%y%">Num.temp if %zo%==true echo "%z%">Num.temp if not exist Num.temp goto even findStr /R "[0-9]" "Num.temp">FindStr.temp del Num.temp for /F "tokens=*" %%a In (FindStr.temp) Do Call :odd %%a del FindStr.temp exit /B :odd set num=%1 set num=%num:"=% :: IF YOU WANT JUST A NUMBER AS OUTPUT, COMMENT THE "IF" COMMANDS AND UNCOMMENT "echo %num%" :: IF YOU WANT A USER FRIENDLY OUTPUT COMMENT "echo %num%" AND UNCOMMENT THE "IF" COMMANDS :: echo %num% if %x%==%num% (echo The largest odd number is X! [%num%]) if %y%==%num% (echo The largest odd number is Y! [%num%]) if %z%==%num% (echo The largest odd number is Z! [%num%]) pause exit /B :even echo All of these numbers are even and/or not numbers! pause exit /B

Looking for something else?

Not the answer you are looking for? Search for more explanations.