Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new code #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Prami.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
$x = 6;
$y = 4;
echo $x + $y;"\n";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be as follows:

echo $x + $y . "\n";



$a = 20;
$b = 5;
echo $a - $b;"\n";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above


$p = 30;
$r = 25;
echo $p * $r;"\n";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above


$x = 7;
$y = 3;
echo $p / $r;
?>
Binary file added php-training/exercise 1/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions php-training/exercise 1/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
39 changes: 39 additions & 0 deletions php-training/exercise 1/1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

$x = 5;
$y = 4;

function Add($x, $y) {
return $x + $y;
}

echo Add(10, 15) . "\n";

$a = 20;
$b = 5;

function Substract($a, $b) {
return $a - $b;
}
echo $a - $b . "\n";

$p = 30;
$r = 25;

function Multiply($p, $r) {
return $p * $r;
}

echo $p * $r ."\n";

$x = 7;
$y = 3;
function Divide($x, $y) {
return $x / $y;
}

echo $x / $y . "\n";