google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Tuesday, April 7, 2020

Write a program in php to print the multiplication table of 9

Write a program in php to print the multiplication table of 9:

Answer:

<? php
define('a', 9);   
for($i=1; $i<=10; $i++)   
{   
  echo $i*a;   
  echo '<br>';     
}  
?>

Write a php program to print factorial of a number

Write a php program to print factorial of a number:
Answer:

$num = 7; 
$factorial = 1; 
for ($x=$num; $x>=1; $x--) 

  $factorial = $factorial * $x; 

echo "Factorial of $num is $factorial"; 
?>


Output:

Factorial of 7 is 5040

अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...