Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this a php program Calculator.php Create a calculator using PHP script and HTML form elements that will perform the following mathematical operations: Addition, Subtraction, Multiplication,

this a php program

image text in transcribedimage text in transcribed

Calculator.php Create a calculator using PHP script and HTML form elements that will perform the following mathematical operations: Addition, Subtraction, Multiplication, Division, Exponentiation. This calculator needs to determine whether the calculated result is an even or an odd number. This calculator also needs to determine whether the calculated result is a prime number or not. The calculator should be designed as below: Operating manual for the calculator: In order to operate the calculator, you need to provide numeric values (operands) in two text boxes, select one (+,- ,,!, exp) of the operators and then click '=' button. Sample input and output screenshots of the calculator are below: Input screen Output screen 10 3 13 is a prime number 10 plus 3 equals 13 13 is an odd number 10 2 10 minus 2 equals 8 is NOT a prime number 8 is an even number 10 3 10 multiply 3 equals 30 30 is NOT a prime number 30 is an even number 10 2 10 divided by 2 equals s 5 is a prime number S is an odd number 10 exp 3 10 exponent 3 equals 1000 1000 is NOT a prime number 1000 is an even number You must include common Header, Menu and Footer to the Calculator.php web page. Hints for Exponentiation operation: Exponentiation is a mathematical operation, written as b", involving two numbers, the base b and the exponent or power n. In PHP, the built-in function for exponentiation operation is: pow (b,n) Calculator.php Create a calculator using PHP script and HTML form elements that will perform the following mathematical operations: Addition, Subtraction, Multiplication, Division, Exponentiation. This calculator needs to determine whether the calculated result is an even or an odd number. This calculator also needs to determine whether the calculated result is a prime number or not. The calculator should be designed as below: Operating manual for the calculator: In order to operate the calculator, you need to provide numeric values (operands) in two text boxes, select one (+,- ,,!, exp) of the operators and then click '=' button. Sample input and output screenshots of the calculator are below: Input screen Output screen 10 3 13 is a prime number 10 plus 3 equals 13 13 is an odd number 10 2 10 minus 2 equals 8 is NOT a prime number 8 is an even number 10 3 10 multiply 3 equals 30 30 is NOT a prime number 30 is an even number 10 2 10 divided by 2 equals s 5 is a prime number S is an odd number 10 exp 3 10 exponent 3 equals 1000 1000 is NOT a prime number 1000 is an even number You must include common Header, Menu and Footer to the Calculator.php web page. Hints for Exponentiation operation: Exponentiation is a mathematical operation, written as b", involving two numbers, the base b and the exponent or power n. In PHP, the built-in function for exponentiation operation is: pow (b,n)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions