osanseviero
  • osanseviero
This is a PHP code to solve syllogisms...any suggestion to make better this code (i know it is in Spanish some parts, sorry)
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!
osanseviero
  • osanseviero
Silogismos
"; $S=0;};;};;};}; if($X1=="Todo" && $Y1=="es") {$M=$A;} else{ if($X1=="Todo" && $Y1=="no es") {$M=$E;} else{ if($X1=="Algun" && $Y1=="es") {$M=$I;} else{ if($X1=="Algun" && $Y1=="no es") {$M=$O;} else{echo "Qué pedo?!?!";};};};}; if($X2=="Todo" && $Y2=="es") {$N=$A;} else{ if($X2=="Todo" && $Y2=="no es") {$N=$E;} else{ if($X2=="Algun" && $Y2=="es") {$N=$I;} else{ if($X2=="Algun" && $Y2=="no es") {$N=$O;} else{echo "Qué pedo?!?!";};};};}; if($F==1 && $M=="A" && $N=="A") {$X="Todo"; $Y="es";} else{ if($F==1 && $M=="E" && $N=="A") {$X="Todo"; $Y="no es";} else{ if($F==1 && $M=="A" && $N=="I") {$X="Algun"; $Y="es";} else{ if($F==1 && $M=="E" && $N=="I") {$X="Algun"; $Y="no es";} else{ if($F==2 && $M=="E" && $N=="A") {$X="Todo"; $Y="es";} else{ if($F==2 && $M=="A" && $N=="E") {$X="Todo"; $Y="no es";} else{ if($F==2 && $M=="E" && $N=="I") {$X="Algun"; $Y="no es";} else{ if($F==2 && $M=="A" && $N=="O") {$X="Algun"; $Y="no es";} else{ if($F==3 && $M=="A" && $N=="A") {$X="Algun"; $Y="es";} else{ if($F==3 && $M=="I" && $N=="A") {$X="Algun"; $Y="es";} else{ if($F==3 && $M=="A" && $N=="I") {$X="Algun"; $Y="es";} else{ if($F==3 && $M=="E" && $N=="A") {$X="Algun"; $Y="no es";} else{ if($F==3 && $M=="O" && $N=="A") {$X="Algun"; $Y="no es";} else{ if($F==3 && $M=="E" && $N=="I") {$X="Algun"; $Y="no es";} else{ if($F==4 && $M=="A" && $N=="A") {$X="Algun"; $Y="es";} else{ if($F==4 && $M=="A" && $N=="E") {$X="Todo"; $Y="no es";} else{ if($F==4 && $M=="I" && $N=="A") {$X="Algun"; $Y="es";} else{ if($F==4 && $M=="E" && $N=="A") {$X="Algun"; $Y="no es";} else{ if($F==4 && $M=="E" && $N=="I") {$X="Algun"; $Y="no es";} else{ $S=1;};};};};};;};};};};};};};};};};};};};}; if ($S==0) { echo "
Corrige tu ortografía en el término medio
"; echo $X1; echo"
"; echo $P1; echo"
"; echo $Y1; echo"
"; echo $Q1; echo"
"; echo $X2; echo"
"; echo $P2; echo"
"; echo $Y2; echo"
"; echo $Q2; echo"
"; echo $X; echo"
"; echo $P; echo"
"; echo $Y; echo"
"; echo $Q; echo"
";} else{ echo "
"; echo $X1; echo"
"; echo $P1; echo"
"; echo $Y1; echo"
"; echo $Q1; echo"
"; echo $X2; echo"
"; echo $P2; echo"
"; echo $Y2; echo"
"; echo $Q2; echo"
"; echo "
No se puede concluir nada
"; echo" ";}; ?>
anonymous
  • anonymous
use pastebin.com to show your code
anonymous
  • anonymous
http://ideone.com/jsaB4 I don't know HTML, nor do I know PHP. However, you do have very deeply-nested if-else blocks. Perhaps they are working too hard? Are they trying to do both input validation and logic?

Looking for something else?

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