Write a java script program to enter two angles of a triangle and find the third angle

Write a javascript program to enter two angles of a triangle and find the third angle

Write a javascript program to enter two angles of a triangle and find the third angle

Javascript program to enter the two angles of a triangle and find the third angle. There are you will learn how to find the third angle of a triangle in javascript language.

Formula

				
					c° = 180° - (a° + b°)
				
			

Code

				
					  <script>
        let p,q,r;
            p=parseInt(prompt("p"));
            q=parseInt(prompt("q"));
            r = 180 - (p + q);
            alert("Third angle of the triangle =: " + r);    
    </script>
				
			
Spread the love