PHP Program Sum of 2 numbers coderinme

PHP Program Sum of 2 numbers

It’s very good language .it is also used in webdesign and code very dynamic language.

PHP Program Sum of 2 numbers
<?php 
function solveMeFirst($a,$b){
 // this function return the sum 
  return $a+$b; 

}
$handle = fopen ("php://stdin","r"); 

// code to take input and store it into a and b
$_a = fgets($handle); 
$_b = fgets($handle); 

//function call 
$sum = solveMeFirst((int)$_a,(int)$_b); 

//output we can write also echo $sum;
print ($sum); 
fclose($handle);

?>

output
5 3
8

PHP Program Sum of 2 numbers

PHP Program Sum of 2 numbers
For more PHP question

Leave a reply:

Your email address will not be published.