Game of Thrones I Hackerrank We all are familiar with the Game of Thrones and love their characters, that’s why today we are going to solve a problem based on this.So the problem is like, Dothraki is planning an attack to usurp King Robert’s throne. King Robert came to know about this conspiracy from Raven and plans to lock the single door through which the enemy can enter his kingdom. But, the problem come here that to lock the door …

Home » Programming » PHP

# Category: PHP

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 …

Even or Odd check it Now coderinme Even or Odd check it Now coderinme Given any number, when it is divided by 2, should give either a remainder 0 or 1. If the remainder is 0, then it is even, If remainder is 1 then it’s odd. In simpler words, An even number is an integer that is exactly divisible by 2. Example: 8, 34, 0. An odd number is an integer that is not exactly divisible by 2. Example: …