PHP proyecto final - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of PHP proyecto final.php

  1. <?php
  2. $v1=15519359;
  3. $v2=6.0;
  4. $v3=35;
  5. $v4=5;
  6. $v5=12.5;
  7. $v6=40;
  8. $opcion=6;
  9.  
  10. $prom=$v2;//opcion 1
  11. $rut=$v1;//opcion 2
  12. $apro=$v3;//opcion 3
  13. $repro=$v4;//opcion 4
  14. $porcentaje=$v5;//opcion 5
  15. $procesados=$v6;//opcion 6
  16.  
  17. if($opcion==0){
  18.        
  19.         echo"Fin";
  20.        
  21. } elseif($opcion==1){
  22.        
  23.         echo "El promedio del curso es : ".$prom;
  24.  
  25. }elseif($opcion==2){
  26.        
  27.         echo "El rut con el mayor promedio : ".$rut;
  28.        
  29. }elseif($opcion==3){
  30.        
  31.         echo"La cantidad de alumnos aprobados son :".$apro;
  32.        
  33. }elseif($opcion==4){
  34.        
  35.         echo"La cantidad de alumnos reprobados son :".$repro;
  36.        
  37. }elseif($opcion==5){
  38.        
  39.         echo"porcentaje de reprobados =".$porcentaje;
  40.        
  41. }elseif($opcion==6){
  42.   
  43.   echo"El total de alumnos reprobados fue de :".$procesados;
  44.   
  45. }
File Description
  • PHP proyecto final
  • PHP Code
  • 24 Dec-2020
  • 747 Bytes
You can Share it: