FIND LARGEST NUMBER

************************************************************************ 

W.A.P TO FIND LARGEST NUMBER AMONG THREE NUMBERS

************************************************************************  

JAVA Program







   



  
Online compiler

Output:


************************************************************************ 

C Program



Online Compiler 

 

************************************************************************ 

C++ Program

Online Compiler

************************************************************************ 

C# Program


 
 
Output:

************************************************************************ 

PHP Program


Online Compiler

Php is a server side scripting language.

************************************************************************ 

JAVASCRIPT Program

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title></title>
<script type="text/javascript">
//  Math.max() method
function check() {
  var a = document.getElementById('n1').value;
  var b = document.getElementById('n2').value;
  var c = document.getElementById('n3').value;
  var x = Math.max(a,b,c);
  document.getElementById('ans').innerText=`MAX VALUE: ${x} `;
}
</script>
</head><body>
<input type="number" name="" id="n1"/>
<input type="number" name="" id="n2"/>
<input type="number" name="" id="n3"/>
<button onclick="check()">Check</button>
<h2 id="ans" ></h2>

</body></html>

Online Compiler

************************************************************************ 

PYTHON Program

 

Online Compiler: 

************************************************************************  

















Comments

Popular posts from this blog

SAME NAME IN CLASS METHOD AND CONSTRUCTOR

PALINDROME NUMBER

FIBONACCI SERIES