Thursday, November 11, 2021

Product and Subtract Two Numbers in PHP

 A simple program that will ask the user to give two numbers and then the program will compute the product, and difference of two numbers using PHP programming language.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.






Program Listing

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Product &amp; Difference of Two Numbers</title>

    <style>

        *,html {

            box-sizing: border-box;

            padding: 0;

            margin: 0;

        }


        body {

            display: flex;

            justify-content: center;

            align-items: center;

            min-height: 100vh;

            background: #fefefe;

            font-family: sans-serif;

            background-color: #19BC9D;

        }


        .container {

            background: #fff;

            border: none;

            text-align: center;

            min-width: 300px;

            color: #fff;

        }


        .title {

            background-color: #14A083;

            padding: 20px;

            border: none;

        }


        .output_wrapper {

            padding: 20px;

            font-size: 20px;

            background-color: #fff;

            margin: 10px 0;

            border: none;

            color: #14A083;

        }


        h1 {

            margin: 0 0 5px;

            line-height: 1;

        }


        p {

            margin: 15px 0 0;

        }

        

        input {

            display: block;

            width: 100%;

            margin-bottom: 20px;

            padding: 10px;

            font-size: 15px;

            text-align: center;

        }


        .output {

            margin: 10px 0;

        }


        button,

        .btnRetry {

            background-color: #14A083;

            color: #fff;

            border: none;

            border-radius: 2px;

            text-align: center;

            text-transform: uppercase;

            text-decoration: none;

            cursor: pointer;

            font-size: 15px;

            padding: 15px 10px;

            width: 100%;

            display: block;

            margin: 20px 0 0;

        }

    </style>

</head>

<body>

    <div class="container">

        <div class="title">

            <h1>Product &amp; Difference<br>of Two Numbers</h1>

            <p>Created By:</p>

            <h2>&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h2>

        </div>

        <div class="output_wrapper">

        <?php

            if(isset($_POST["btnSubmit"])){

                echo '<p>Your inputs are ' . $_POST["num1"] . ' and ' . $_POST["num2"] . '.</p>

                    <h3 class="output">Product: '. $_POST["num1"] * $_POST["num2"] .'</h3>

                    <h3 class="output">Difference: '. ((int)$_POST["num1"] - (int)$_POST["num2"]) .'</h3>

                    <a href="sub_prod.php" class="btnRetry">Retry?</a>';

            } else {

                echo '<form action="" method="post">

                        <label>Enter 1st number here</label>

                        <input type="number" name="num1" required>


                        <label>Enter 2nd number here</label>

                        <input type="number" name="num2" required>


                        <button type="submit" name="btnSubmit">Submit</button>

                    </form>';

            }

        ?>

        </div>

    </div>

</body>

</html>


Bakit Nag Vlog Ako?

String Input in Python

String Input in Python

 A simple program to ask the user to give the user name and address and then the program will display the user name, and address in upper case format using Python programming language.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

print()
print("String Input in Python")
print()
Name = input("Give Your Name : ")
Address = input("Give Your Address : ")
print()
print("Your Name :" + str(Name.upper()))
print("Your Address : " + str(Address.upper()))
print()
print("\tEnd of Program")
print()


Wednesday, November 10, 2021

Product and Quotient of Two Numbers in PHP

Product and Quotient of Two Numbers in PHP

 A simple program to ask the user to give two numbers and then the program will compute the product and quotient of two given numbers by the user using PHP programming language.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

index.php


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Product &amp; Quotient of Two Numbers</title>

    <style>

        *,html {

            box-sizing: border-box;

            padding: 0;

            margin: 0;

        }


        body {

            display: flex;

            justify-content: center;

            align-items: center;

            min-height: 100vh;

            background: #fefefe;

            font-family: sans-serif;

            background-color: #19BC9D;

        }


        .container {

            background: #fff;

            border: none;

            text-align: center;

            min-width: 300px;

            color: #fff;

        }


        .title {

            background-color: #14A083;

            padding: 20px;

            border: none;

        }


        .output_wrapper {

            padding: 20px;

            font-size: 20px;

            background-color: #fff;

            margin: 10px 0;

            border: none;

            color: #14A083;

        }


        h1 {

            margin: 0 0 5px;

            line-height: 1;

        }


        p {

            margin: 15px 0 0;

        }

        

        input {

            display: block;

            width: 100%;

            margin-bottom: 20px;

            padding: 10px;

            font-size: 15px;

            text-align: center;

        }


        .output {

            margin: 10px 0;

        }


        button,

        .btnRetry {

            background-color: #14A083;

            color: #fff;

            border: none;

            border-radius: 2px;

            text-align: center;

            text-transform: uppercase;

            text-decoration: none;

            cursor: pointer;

            font-size: 15px;

            padding: 15px 10px;

            width: 100%;

            display: block;

            margin: 20px 0 0;

        }

    </style>

</head>

<body>

    <div class="container">

        <div class="title">

            <h1>Product &amp; Quotient<br>of Two Numbers</h1>

            <p>Created By:</p>

            <h2>&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h2>

        </div>

        <div class="output_wrapper">

        <?php

            if(isset($_POST["btnSubmit"])){

                echo '<p>Your inputs are ' . $_POST["num1"] . ' and ' . $_POST["num2"] . '.</p>

                    <h3 class="output">Product: '. $_POST["num1"] * $_POST["num2"] .'</h3>

                    <h3 class="output">Quotient: '. $_POST["num1"] / $_POST["num2"] .'</h3>

                    <a href="mult_div.php" class="btnRetry">Retry?</a>';

            } else {

                echo '<form action="" method="post">

                        <label>Enter 1st number here</label>

                        <input type="number" name="num1" required>


                        <label>Enter 2nd number here</label>

                        <input type="number" name="num2" required>


                        <button type="submit" name="btnSubmit">Submit</button>

                    </form>';

            }

        ?>

        </div>

    </div>

</body>

</html>

Tuesday, November 9, 2021

Area of a Circle in AngularJS

Calculate Area of Circle Using ng-app in AngularJS

 Machine Problem

Write a program that uses ng-app directive that will calculate the area of the circle. Using the following formula : area = 3.14 * radius * radius

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.






Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 26, 2021 Monday 10:43 AM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head> 

<title>Calculate Area of Circle Using ng-app in AngularJS</title>

</head>

<style>

body {

   font-family: "arial";

   font-style: bold;

   font-size: 18px;

  }

 </style>

<script type="text/javascript" src="angular.min.js"></script>

<body><br>

<h3>Calculate Area of Circle Using ng-app in AngularJS</h3>

<body>

<div ng-app="myApp" ng-controller="Area_Circle_Controller">

The given radius {{radius | number : 2}}. <br><br>

The area of the circle is {{area | number : 2}}

</div>

<script>

var app = angular.module("myApp", []);

app.controller("Area_Circle_Controller", function($scope) {


    $scope.radius = 5.0;

    $scope.area = (3.14 * $scope.radius * $scope.radius);

});

</script>

</body>

</html>

</body>

</html>

Accommodation Room in C++

Accommodation Room in C++

Machine Problem in C++

Make a program that will input type of accommodation room.  A-for first class, B-for second class. Charge as   follows : first class=800.00 and second class = 650.00.   Your program will be terminated if you input C in   the accommodation room type.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Program Listing


/*

Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

www.jakerpomperada.blogspot.com and www.jakerpomperada.com

jakerpomperada@gmail.com

Bacolod City, Negros Occidental Philippines.


Machine Problem in C++


Make a program that will input type of accommodation room.

 A-for first class, B-for second class. Charge as 

 follows : first class=800.00 and second class = 650.00. 

 Your program will be terminated if you input C in 

 the accommodation room type.

*/


#include <iostream>

#include <cctype>


int main()

{

char select_room;

    char ch='N';

do {


std::cout << "\n\n";

std::cout << "\tAccommodation Room in C++\n";

std::cout <<"\n";

std::cout <<"\tA-for first class\n";

std::cout <<"\tB-for second class.\n";

std::cout <<"\tC-Quit Program";

std::cout <<"\n\n\t";

std:: cin >> select_room;

ch = toupper(select_room);

 

if (ch=='C') {

break; 

}

 

if (ch=='A') {

std::cout <<"\n";

std::cout <<"\tFirst Class=800.00";

} else if  (ch=='B') {

std::cout <<"\n";

std::cout <<"\tSecond Class = 650.00";

} while (ch!='C');

  std::cout << "\n\n";

std::cout << "\tEnd of Program";

std::cout <<"\n";

}



Monday, November 8, 2021

Highest and Lowest Numbers in PHP

Highest and Lowest Numbers in PHP

 A simple program to ask the user to give five numbers and then the program will determine which of the five numbers has the highest, and lowest numerical value using PHP programming language.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

high_low.php

<?php

    if(isset($_POST["btnSubmit"])) {

        $highest = max($_POST["input1"],

                    $_POST["input2"],

                    $_POST["input3"],

                    $_POST["input4"],

                    $_POST["input5"]);

        

        $lowest = min($_POST["input1"],

                    $_POST["input2"],

                    $_POST["input3"],

                    $_POST["input4"],

                    $_POST["input5"]);

    }

?>

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Highest &amp; Lowest Numbers</title>

    <style>

        *,html {

            box-sizing: border-box;

            padding: 0;

            margin: 0;

        }

        body {

            display: flex;

            justify-content: center;

            align-items: center;

            min-height: 100vh;

            background: #fefefe;

        }


        .container {

            padding: 20px;

            border-radius: 10px;

            background: #fff;

            border: #000 solid 1px;

            text-align: center;

            min-width: 300px;

        }


        h1, h2 {

            margin: 0 0 5px;

            line-height: 1;

        }

        

        input {

            display: block;

            width: 100%;

            margin-bottom: 10px;

            padding: 10px;

            font-size: 15px;

        }


        input:last-of-type {

            margin: 0;

        }


        .output_wrapper {

            padding: 20px;

            font-size: 20px;

            background-color: #ccc;

            margin: 10px 0;

            border: none;

        }


        .output {

            margin: 10px 0 0;

        }


        button,

        .btnRetry {

            background-color: #4CAF50;

            color: #fff;

            border: none;

            border-radius: 2px;

            text-align: center;

            text-transform: uppercase;

            text-decoration: none;

            cursor: pointer;

            font-size: 15px;

            padding: 10px;

            width: 100%;

            display: block;

        }

    </style>

</head>

<body>

    <?php

        if(isset($highest, $lowest)){

            echo '<div class="container">

                    <h1>Highest &amp; Lowest Numbers</h1>

                    <h2>&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h2>


                    <div class="output_wrapper">

                        <p>Your inputs are: '

                            .$_POST["input1"] . ', ',

                            $_POST["input2"] . ', ',

                            $_POST["input3"] . ', ',

                            $_POST["input4"] . ', ',

                            $_POST["input5"] .

                        '</p>

                        <h3 class="output">Highest No: '.$highest.'<br> Lowest No: '.$lowest.'</h3>

                    </div>


                    <a href="high_low.php" class="btnRetry">Retry?</a>

                </div>';

        } else {

            echo '<form action="" method="post" class="container">

                    <h1>Highest &amp; Lowest Numbers</h1>

                    <h2>&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h2>


                    <div class="output_wrapper">

                        <input type="text" name="input1" placeholder="Enter 1st number here..." required>

                        <input type="text" name="input2" placeholder="Enter 2nd number here..." required>

                        <input type="text" name="input3" placeholder="Enter 3th number here..." required>

                        <input type="text" name="input4" placeholder="Enter 4th number here..." required>

                        <input type="text" name="input5" placeholder="Enter 5th number here..." required>

                    </div>


                    <button type="submit" name="btnSubmit">Submit</button>

                </form>';

        }

    ?>

</body>

</html>

Addition of Five Numbers in PHP