'count1=1
'Do msgbox "Solve for x in Ax^2 + Bx + C = 0" 'loop if value is null??
Do A=inputbox("Enter Variable A","Equation","Variable A") bolA = Isnumeric(A) If (BolA = false) then msgbox "Variable A is invalid" end if loop until bolA = true Do B=inputbox("Enter Variable B","Equation","Variable B") bolB=Isnumeric(B) If (bolB=false) then msgbox "Variable B is invalid" end if loop until bolB = true Do C=inputbox("Enter Variable C","Equation","Variable C") bolC=Isnumeric(C) If (bolC=false) then msgbox "Variable C is invalid" end if loop until bolC = true
result1=(B*B)-(4*A*C) if (A+B+C=0) then msgbox "You're a fool and this program hates you!!!" elseif (B+C=0) then msgbox "Congratulations, you have succeeded in pretty much dividing by zero and created an infinite number." +chr(13) +chr(13) + "Reality has just imploded on itself & the universe says fuck you muchly." elseif (A+C=0) then msgbox "Congratulations, you have succeeded in pretty much dividing by zero and created an infinite number." +chr(13) +chr(13) + "Reality has just imploded on itself & the universe says fuck you muchly." elseif (C=0) then msgbox "You just mind fucked me." +chr(13) +chr(13) +" x = 0" elseif (A+B=0) then result7=C msgbox "You IDIOT, x obviously = " +Cstr(C) elseif (A=0) then result6= C/B msgbox "This is a linear equation"+chr(13) +chr(13) +Cstr(B)+"x + ("+Cstr(C)+") = y" +chr(13) +chr(13)+"When y = 0, variable x = " +Cstr(result6) elseif (result1=0) then result4=(-B)/(2*A) msgbox "The equation you have entered is:" +chr(13)+chr(13)