PHP Find Output Programs
- PHP find output programs (basics) | set 1
- PHP find output programs (basics) | set 2
- PHP find output programs (basics) | set 3
- PHP find output programs (Superglobals) | set 1
- PHP find output programs (conditional statements) | set 1
- PHP find output programs (conditional statements) | set 2
- PHP find output programs (conditional statements) | set 3
- PHP find output programs (switch Statement) | set 1
- PHP find output programs (switch Statement) | set 2
- PHP find output programs (switch Statement) | set 3
- PHP find output programs (Operators) | set 1
- PHP find output programs (Operators) | set 2
- PHP find output programs (Operators) | set 3
- PHP find output programs (Loops) | set 1
- PHP find output programs (Loops) | set 2
- PHP find output programs (Loops) | set 3
- PHP find output programs (Loops) | set 4
- PHP find output programs (Arrays) | set 1
- PHP find output programs (Arrays) | set 2
- PHP find output programs (Arrays) | set 3
- PHP find output programs (User-defined functions) | set 1
- PHP find output programs (User-defined functions) | set 2
- PHP find output programs (User-defined functions) | set 3
- PHP find output programs (String Functions) | set 1
- PHP find output programs (String Functions) | set 2
- PHP find output programs (Number Functions) | set 1
- PHP find output programs (Math Functions) | set 1
- PHP find output programs (Math Functions) | set 2
- PHP find output programs (Date and Time) | set 1
- PHP find output programs (define Constant) | set 1
- PHP find output programs (static variables, classes, methods) | set 1
- PHP find output programs (static variables, classes, methods) | set 2
- PHP find output programs (Regular Expressions) | set 1
- PHP find output programs (Exceptions) | set 1
- PHP find output programs (Exceptions) | set 2
- PHP find output programs (Filters) | set 1
- PHP find output programs (Filters) | set 2
- PHP find output programs (JSON) | set 1
- PHP find output programs (const Keyword) | set 1
- PHP find output programs (Class & Objects) | set 1
- PHP find output programs (Class & Objects) | set 2
- PHP find output programs (Class & Objects) | set 3
- PHP find output programs (Constructors and Destructors) | set 1
- PHP find output programs (Constructors and Destructors) | set 2
- PHP find output programs (Constructors and Destructors) | set 3
- PHP find output programs (Inheritance) | set 1
- PHP find output programs (Inheritance) | set 2
- PHP find output programs (Inheritance) | set 3
Answer 1:-
Output:
Explanation:
In the above program, we calculated the simple interest. Here, we defined three variable $P, $R, and $T initialized with 5000, 5, and 2 respectively.
Here, we used two PHP blocks (<?php ?>). We can write any number of blocks in the PHP script.
Now coming to the expression:
$SI = ($P * $R * $T)/100; $SI = (5000*5*2)/100; $SI = (50000)/100; $SI = 500;
Then we used print() function to print the value of $SI with a specified string.
Answer 2:-
Output:
Explanation:
In the above program, we calculated the simple interest. Here, we defined three variable $P, $R, and $T initialized with 5000, 5, and 2 respectively.
Now coming to the expression:
$SI = ($P * $R * $T)/100; $SI = (5000*5*2)/100; $SI = (50000)/100; $SI = 500;
Here we used '<b> … </b>' tag, which is used to print specified data in bold style. Then 500 will be printed in bold style, and "Simple Interest:" will be printed in a simple style.
Answer 3:
Output:
Explanation:
In the above program, we calculated the simple interest. Here, we defined three variable $P, $R, and $T initialized with 5000, 5, and 2 respectively.
Now coming to the expression:
$SI = ($P * $R * $T)/100; $SI = (5000*5*2)/100; $SI = (50000)/100; $SI = 500;
Here '<br>' tag is used to break the line, that's why "Simple" will print in first line and then "Interest: 500" will be printed in second line
Answer 4:
Output:
Explanation:
In the above program, we defined variable $A, $B, and $C and initialized with 8, 5, and 2 respectively.
Now coming to the expression.
$D = $B*$B - 4*A*C;
In the above expression, we used A and C instead of $A and $C. Then the value of "4*A*C" becomes 0.
Now evaluate expression:
$D = $B*$B - 4*A*C; $D = 5*5-0; $D = 25;
So, 25 will be printed on the webpage.
Answer 5:
Output:
Explanation:
In the above program, we defined variable $A, $B, and $C and initialized with 8, 5, and 2 respectively.
Now coming to the expression and evaluate:
$D = $B*$B - 4*A*C; $D = $B*$B - 4*A*C; $D = 5*5 - 4*8*2; $D = 25 - 64; $D = -39;
So, -39 will be printed on the webpage.
need an explanation for this answer? contact us directly to get an explanation for this answer