Currently i am working on a exercise and just need a push in the right direction to solve this.
The project is a six million dollar man quiz with 10 questions the exercise is to provide logic and assign a letter grade based on the number right or wrong currently ive tried
SET grade =
IF "%right%"=="10" SET grade=A+
IF "%right%"=="9" SET grade=B+
IF "%right%"=="7" SET grade=C+
IF "%right%"=="5" SET grade=D+
IF "%right%"=="4" SET grade=F
at the end of the program it would echo the letter grade based on the %right%
Your letter grade based on answers = %grade%
I also tried
IF "%right%" == "10" (
SET grade=A+
)
not working unless my problem is with set grade =
REM Define and initialize variables that will be used to track the total number
REM of right and wrong answers
SET /A Right = 0
SET /A Wrong = 0
SET grade =
I made the experience that avoiding white spaces solves some problems as these are compared, too. So give this a try: