PHP coding

profileyahoogeek88

 

Write a web application that will allow a user to input a positive  (32-bit) integer and choose some formats and function for displaying  that integral value. After choices are made, the user will click on a  submit button and the chosen facts about the input number will be  displayed.

The format/computation choices to be supported are:

  • Names
  • Prime Factors
  • Divisors
  • Base Equivalents
  • Squares and Roots
  • Fun Facts

The data displayed for each category above must include:

  • Names 
    • English text (e.g., One thousand seven hundred fifty-six)
    • Roman Numerals (for numbers less than or equal to 4999)
  • Prime Factors 
    • A list of the prime factors (duplicates should be included) in ascending order
  • Divisors 
    • An ascending list of all divisors of the number
  • Base Equivalents 
    • Binary
    • Octal
    • Hexadecimal
  • Squares and Roots 
    • The number squared
    • The number cubed
    • The square root of the number
    • The cube root of the number
  • Fun facts 
    • The number of digits in the number
    • The sum of the digits of the number
    • The number in reverse order

The input page and the resulting page should be well-constructed and  formatted nicely. Only the sections requested by the initial page will  be displayed on the resulting page. Be sure to title each selected  section of the resulting page and label the output.

Error checking must be done for inputs. If an error is detected in the inputs, an appropriate error message should be printed.

Your submission must be able to be run through the web server that is built into PHP ("php -S localhost:8000").

  • 5 years ago
  • 60
Answer(0)