Assignment 1: Basics in PHP

 

Assignment 1:Basics in PHP

Write a PHP script to perform arithmetic operations on two numbers (Addition, Subtraction, Multiplication Division ).


Practice Programs: 

1. Write a PHP script to perform arithmetic operations on two numbers (Addition, Subtraction, Multiplication Division ). 


Answer : 

File Name : index.php



2. Write a PHP script to display a maximum of two numbers using a conditional operator. 


Answer : 

File Name : index.php



3. Write a PHP script that will perform pre and post-increment of a number. (Example ++a, a++). 


Answer : 

File Name : index.php

SET A: 

1. Write a PHP Script to display Quotient and Remainder of the division of two variables. 


Answer : 

File Name : index.php



2. Write a PHP Script to swap the values of two variables.

Answer : 

File Name : index.php



3. Write a PHP Script which will convert temperatures from Celsius(C)to Fahrenheit (F). (Hint: C=5.0/9(F-32) 


Answer : 

File Name : index.php



SET B: 

1. Write a PHP Script to display the surface area and volume of a cuboid. (Hint: surface area=2(lb+lh+bh ), volume = l*b*h ) 


Answer : 

File Name : index.php



2. Write a PHP Script to calculate the area of Circle, Square, and Rectangle. 


Answer : 

File Name : index.php



3. Write a PHP Script to display the total and percentage of Marks of Subjects (Out of 100) Data Structure, Digital Marketing, PHP, SE, and Big data. 


Answer : 

File Name : index.php



SET C: 

1. Write a PHP Script to calculate the total cost of AIR Ticket Reservation and display the details for Name, Address, Contact No, Source, Destination, Date of journey, Gender of passenger, No of Persons, Price per Ticket, etc. 

Answer : 

File Name : index.php


Assignment 1: Basics in PHP Assignment 1: Basics in PHP Reviewed by technical_saurabh on March 16, 2021 Rating: 5

No comments:

Powered by Blogger.