Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

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
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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.

Join Brainly to access

this expert answer

SIGN UP FOR FREE
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" ";}; ?>
use pastebin.com to show your code
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?

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question