PHP Online Compiler
Example: PHP program to find all angles of a triangle if two angles are given
C
C++
C#
Java
Python
PHP
main.php
STDIN
Run
<?php // PHP program to find all angles of a triangle if two angles are given $p = 50; $q = 70; $r = NULL; // p, q, and r is all angles of the triangle // Compute third angle $r = 180 - ($p + $q); // Output echo "Third angle of the triangle = " . $r; ?>
Output
Clear
ADVERTISEMENTS