Sunday, 5 March 2017

Strong Number

Write a program to check strong number?

A strong number said to be if sum of factorial of each digit from n is equal to given number
i.e           145 = 1! + 4! + 5!
                       = 1 + 24 + 120

                      =145

/*   ***********************************
           Girfa : Student Help
           Strong Number Program

Perfect Number


 Program to check perfect number

A number said to perfect if sum of all its divisor is equal to given number

i.e

Image from wikipedia

/*   ***********************************
           Girfa : Student Help
           Magic Number Program

Saturday, 4 March 2017

Magic Number


Program for check whether a number is Magic or Not

A Magic number said to Magic on the behalf of following rule
  • Sum of each digit (1729=1+7+2+9=19)
  • Reverse obtain sum of digit i.e. (19=91)

Thursday, 2 March 2017

MySQL Insert Record





Table Structure

Field
Type
Null
Default
Comments
roll
int(11)
No 

 Auto Increment
name
varchar(50)
No 


city
varchar(50)
No 


sub
varchar(30)
No 





Object Oriented Approach


<?php 
$servername = "localhost";
$username = "root";
$password = "";