fork download
  1.  
  2. <?php
  3. function fahrenheit_to_celsius($given_value)
  4. {
  5. $celsius=5/9*($given_value-32);
  6. return $celsius ;
  7. }
  8.  
  9. function celsius_to_fahrenheit($given_value)
  10. {
  11. $fahrenheit=$given_value*9/5+32;
  12. return $fahrenheit ;
  13. }
  14.  
  15. ?>
  16.  
  17. <html>
  18. <head>
  19. <title>Temp. Conv.</title>
  20. </head>
  21. <body>
  22. <form action="" method="post">
  23. <table>
  24.  
  25. <tr>
  26. <td>
  27. <select name="first_temp_type_name">
  28. <option value="fahrenheit">Fahrenheit</option>
  29. <option value="celsius">Celsius</option>
  30. </select>
  31. </td>
  32. </tr>
  33. <tr>
  34. <td>
  35. <input type="text" name="given_value">
  36. </td>
  37. </tr>
  38. <tr>
  39. <td>
  40. <select name="second_temp_type_name">
  41. <option value="fahrenheit">Fahrenheit</option>
  42. <option value="celsius">Celsius</option>
  43. </select>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td>
  48. <input type="submit" name="btn" value="Convert">
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>
  53. <?php
  54. if(isset($_POST['btn']))
  55. {
  56. $first_temp_type_name=$_POST['first_temp_type_name'];
  57. $second_temp_type_name=$_POST['second_temp_type_name'];
  58. $given_value=$_POST['given_value'];
  59. if($first_temp_type_name=='fahrenheit')
  60. {
  61. $celsious=fahrenheit_to_celsius($given_value);
  62. echo "Fahrenheit $given_value = $celsious Celsious";
  63. }
  64. if($first_temp_type_name=='celsius')
  65. {
  66. $fahrenheit=celsius_to_fahrenheit($given_value);
  67. echo "Celsious $given_value = $fahrenheit Fahrenheit";
  68. }
  69.  
  70.  
  71. }
  72.  
  73. ?>
  74. </td>
  75. </tr>
  76. </table>
  77. </form>
  78. </body>
  79. </html>
  80.  
  81.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gcc-5 -c -pipe -O2 test.adb
test.adb:2:01: compilation unit expected
test.adb:3:36: illegal character
test.adb:4:05: illegal character, replaced by "("
test.adb:5:09: illegal character
test.adb:6:09: compilation unit expected
test.adb:7:05: illegal character, replaced by ")"
test.adb:9:36: illegal character
test.adb:10:05: illegal character, replaced by "("
test.adb:11:09: illegal character
test.adb:12:09: compilation unit expected
test.adb:13:05: illegal character, replaced by ")"
test.adb:15:01: illegal character
test.adb:53:22: illegal character
test.adb:54:30: illegal character
test.adb:55:21: illegal character, replaced by "("
test.adb:56:25: illegal character
test.adb:57:25: illegal character
test.adb:58:25: illegal character
test.adb:59:28: illegal character
test.adb:60:25: illegal character, replaced by "("
test.adb:61:29: illegal character
test.adb:63:25: illegal character, replaced by ")"
test.adb:64:28: illegal character
test.adb:65:25: illegal character, replaced by "("
test.adb:66:29: illegal character
test.adb:68:25: illegal character, replaced by ")"
test.adb:71:21: illegal character, replaced by ")"
test.adb:73:21: illegal character
gnatmake: "test.adb" compilation error
stdout
Standard output is empty