Wednesday, March 30, 2022

My Online Arithmetic Calculator in PHP

 A simple online arithmetic calculator using PHP programming language that can perform addition, subtraction, multiplication, and division.

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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support







Program Listing

index.php

<?php
    $form = "";
    $solution = "display:none;";
    if(isset($_POST["operand1"], $_POST["operand2"], $_POST["operation"])) {
        switch ($_POST["operation"]) {
            case 'Add':
                $calc = $_POST["operand1"] + $_POST["operand2"];
                $operand1 = "1st Addend is ".$_POST["operand1"];
                $operand2 = "2nd Addend is ".$_POST["operand2"];
                $result   = "The Sum is ".$calc;
                break;
            case 'Subtract':
                $calc = $_POST["operand1"] - $_POST["operand2"];
                $operand1 = "Minuend is ".$_POST["operand1"];
                $operand2 = "Subtrahend is ".$_POST["operand2"];
                $result   = "The Difference is ".$calc;
                break;
            case 'Multiply':
                $calc = $_POST["operand1"] * $_POST["operand2"];
                $operand1 = "Multiplicand is ".$_POST["operand1"];
                $operand2 = "Multiplier is ".$_POST["operand2"];
                $result   = "The Product is ".$calc;
                break;
            case 'Divide':
                $calc = $_POST["operand1"] / $_POST["operand2"];
                $operand1 = "Dividend is ".$_POST["operand1"];
                $operand2 = "Divisor is ".$_POST["operand2"];
                $result   = "The Qoutient is ".$calc;
                break;
        }
        $form = "display:none;";
        $solution = "";
    }
?>
<!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>My Online Arithmetic Calculator in PHP</title>
    <style>
        *, html {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            display: flex;
            justify-content: center;
        }
        h1 {
            font-size: 40px;
            border-top: 1px solid #000;
            border-bottom: 1px solid #000;
            padding: 5px;
            margin-bottom: 20px;
            text-align: center;
        }
        label {
            font-size: 20px;
        }
        .container {
            margin-top: 15vh;
            padding: 10px;
        }
        form {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .wrapper {
            display: block;
            margin: 0 auto 10px;
            width: 300px;
        }
        input {
            padding: 5px;
            font-size: 14px;
        }
        table {
            margin-left: 30px;
        }
        .operations table td label,
        .operations table td input {
            cursor: pointer;
        }
        button {
            padding: 8px;
            width: 90px;
        }
        .border {
            padding: 50px;
            border: 1px solid #000;
        }
        .border h2 {
            font-size: 25px;
            margin-bottom: 5px;
        }
        .border p {
            margin-bottom: 5px;
        }
    </style>
</head>
<body>
    <main class="container">
        <div style="<?= $form; ?>">
            <h1>My Online Arithmetic Calculator in PHP</h1>
<h3 align='center'> Jake Rodriguez Pomperada, MAED-IT,MIT </h3>
             <br><br>
            <form action="" method="post">
                <div class="wrapper">
                    <label for="">Operand #1: </label>
                    <input type="number" name="operand1" placeholder="Enter a number" required>
                </div>
                <div class="wrapper">
                    <label for="">Operand #2: </label>
                    <input type="number" name="operand2" placeholder="Enter a number" required>
                </div>
                <div class="wrapper operations">
                    <label>Choose Operation:</label>
                    <table>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Add" value="Add" checked>
                                <label for="Add">- Add</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Subtract" value="Subtract">
                                <label for="Subtract">- Subtract</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Multiply" value="Multiply">
                                <label for="Multiply">- Multiply</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Divide" value="Divide">
                                <label for="Divide">- Divide</label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="wrapper">
                    <button type="submit">Submit</button>
                </div>
            </form>
        </div>
        <div class="border" style="<?= $solution; ?>">
            <h2>Hello!</h2>
            <p>You sent the following values:</p>
            <p><?= $operand1; ?></p>
            <p><?= $operand2; ?></p>
            <p><?= $result; ?></p>
        </div>
    </main>
</body>
</html>


Tuesday, March 29, 2022

Product and Sum of Two Numbers Using Text File in C++

Product and Sum of Two Numbers Using Text File in C++

 A simple program to show how to declare text files, one-dimensional arrays, creating functions using a C++ 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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

// math.cpp

// Jake R. Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental


#include <iostream>

#include <fstream>


using namespace std;



int add(int x, int y)

{

    return(x+y);

}


int product(int a,int b)

{

    return(a*b);

}


  int main() {

      ofstream myfile("solve.txt");

      int values[2];


      cout << "\n\n";

      cout << "\t\tProduct and Sum of Two Numbers Using Text File in C++";

      cout << "\n\n";

      cout << "Enter two numbers :=> ";

      cin >> values[0] >> values[1];

      cout << "\n";

      cout << "\nThe product of "

           << values[0] << " and "

           << values[1] << " is "

           << product(values[0],values[1])

           << ".";

        cout << "\nThe sum of "

           << values[0] << " and "

           << values[1] << " is "

           << add(values[0],values[1])

           << ".";

        

         cout << "\n\n";

         cout << "Data has been saved in solve.txt";

         cout << "\n\n";

         myfile << "\n======================";

         myfile << "\n   Resulted Values ";

         myfile << "\n======================";

         myfile << "\n";

         myfile << "\nThe product of "

           << values[0] << " and "

           << values[1] << " is "

           << product(values[0],values[1])

           << ".";

        myfile << "\nThe sum of "

           << values[0] << " and "

           << values[1] << " is "

           << add(values[0],values[1])

           << ".";

         myfile << "\n\n";

         myfile.close();

         system("pause");

  }

Days of The Week in C#

Days of the Week in C#

 A program to display the current day of the week and all the days of the week using the C# 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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support




Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
            {

              
                DayOfWeek today = DateTime.Today.DayOfWeek;
               

                Console.WriteLine();
                Console.Write("\tDays of the Week in  C#");
                Console.WriteLine("\n\n");

                Console.WriteLine("\tToday is {0}\n\n", today);
                // Demonstrate all DayOfWeek values.
                Console.WriteLine("\t{0}, {1}, {2}, {3}, {4}, {5}, {6}",
                    DayOfWeek.Monday,
                    DayOfWeek.Tuesday,
                    DayOfWeek.Wednesday,
                    DayOfWeek.Thursday,
                    DayOfWeek.Friday,
                    DayOfWeek.Saturday,
                    DayOfWeek.Sunday);

                    Console.ReadKey();
                       
        }
    }
}

Monday, March 28, 2022

Factorial a Number Using Recursion in C#

  A program that will ask the user to give a number and then the program will compute the factorial value of the given number using a recursion algorithm using C# 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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine();
            Console.Write("\tFactorial a Number Using Recursion in C#");
            Console.WriteLine("\n");
            Console.Write("\tGive a Number : ");    
    
          
            int number =Convert.ToInt32(Console.ReadLine());    
    
           
            double factorial = Factorial_Recursion(number);

            Console.WriteLine("\n");
            Console.WriteLine("\tThe factorial of "+number+" = "+factorial.ToString());
            Console.WriteLine();
            Console.Write("\tEnd of Program");
            Console.WriteLine();
            Console.ReadKey();
    
        }    
        public static double Factorial_Recursion(int number)    
        {    
            if (number == 0)    
                return 1;    
            return number * Factorial_Recursion(number-1);//Recursive call here 
    
        }    
        }
    }

Factorial a Number Using Recursion in Java

Factorial a Number Using Recursion in Java

 A program that will ask the user to give a number and then the program will compute the factorial value of the given number using a recursion algorithm using Java 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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

import java.util.*;

public class Factorial {

public static void main(String args[])
{
    int num;
Scanner input  = new Scanner(System.in);
   System.out.println("\n");
        System.out.print("\tFactorial a Number Using Recursion in Java");
        System.out.println("\n");
    System.out.print("\tGive a Number : ");
    num=input.nextInt();
        System.out.println();
    System.out.println("\tThe factorial("+num+") = "+factorial_recursion(num)+"\n");
    System.out.print("\tEnd of Program");
        System.out.println("\n");

    input.close();
   
}

static int factorial_recursion(int n)
{
    if(n==0)
        return 1;
    else
        return n*factorial_recursion(n-1);
}
}


Saturday, March 26, 2022

Addition of Five Numbers in AngularJS

Addition of Five Numbers in AngularJS

 Machine Problem

Write a program that uses ng-model directive that will accept five numbers from the user and then the program will display the five given numbers and compute the total sum of the given five numbers and display the results on the screen.

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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

<!-- index.htm Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT Date : July 26, 2021 Monday 3:00 PM Place : Bacolod City, Negros Occidental Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com Email : jakerpomperada@gmail.com --> <html> <head> <title>Addition of Five Numbers Using ng-model in AngularJS</title> </head> <style> body { font-family: arial; font-size: 25px; font-weight: bold; } </style> <script type="text/javascript" src="angular.min.js"> </script><br> <div ng-app ng-init="val_1=0;val_2=0;val_3=0;val_4=0;val_5=0;"> <form> <table border="0" cellspacing=10> <tr>Addition of Five Numbers Using ng-model in AngularJS</tr> <tr> <td>Enter 1st Value </td> <td><input type="number" ng-model="val_1" ></td> </tr> <td>Enter 2nd Value </td> <td><input type="number" ng-model="val_2" ></td> </tr> <td>Enter 3rd Value </td> <td><input type="number" ng-model="val_3" ></td> </tr> <td>Enter 4th Value </td> <td><input type="number" ng-model="val_4" ></td> </tr> <td>Enter 5th Value </td> <td><input type="number" ng-model="val_5" ></td> </tr> </table> </form> <p>The sum of {{val_1}}, {{val_2}}, {{val_3}}, {{val_4}}, and {{val_5}} is {{val_1+val_2+val_3+val_4+val_5}}. </p> </div> </body> </html>

Kilometers To Miles in AngularJS

Kilometers To Miles Using AngularJS

 Machine Problem 

Write a program that uses ng-model directive that will accept distance in kilometers from the user and then the program will convert the given kilometer distance value into miles distance equivalent, and display the results on the screen. 

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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

<!-- index.htm

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

  Date     : July 26, 2021  Monday   3:00 PM

  Place    : Bacolod City, Negros Occidental

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

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head>

  <title>Kilometers To Miles Using ng-model in AngularJS</title>

</head>

<style>

body {

  font-family: arial;

  font-size: 25px;

  font-weight: bold;

}

</style>

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

</script><br>

<div ng-app ng-init="kilometers=0">

  <form>

  <table border="0" cellspacing=10>

  <tr>Kilometers To Miles Using ng-model in AngularJS</tr>

  <tr>

  <td>Enter Kilometer(s) Value </td>

  <td><input type="number"  ng-model="kilometers" ></td>

  </tr>

</table>

  </form>

  <p>{{kilometers}} Kilometer(s) is equivalent to 

     {{(kilometers * 0.621371192) | number:2}} Mile(s).</p> 

</div>

</body>

</html>



Area of a Square in C

Area of the Square in C

 A program that will compute the area of the square using C 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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program LIsting

#include <stdio.h>
 
int main() {
  
   int side_value=0, area=0;
  
   printf("\n\n");
   printf("\tArea of the Square in C");
   printf("\n\n");
   printf("\tGive the Length of Side of the Square : ");
   scanf("%d", &side_value);
 
   area = (side_value * side_value);
   
   printf("\n");
   printf("\tArea of Square : %d", area);
   printf("\n\n");
   printf("\tEnd of Program");
   printf("\n");
   return (0);
}


Thursday, March 24, 2022

Full Time and Part Time Employee's Payroll System Using Java Version 1.0

Full Time and Part Time Employee's Payroll System Using Java Version 1.0

 Machine Problem


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 in 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg


=================================================

Want to support my the channel?


GCash Account


Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing

RunEmployee.java

import java.text.DecimalFormat;
import java.util.Scanner;

public class RunEmployee
{
    private static DecimalFormat df2 = new DecimalFormat("#.00");

    public static void main(String[] args) 
    {
        Scanner input = new Scanner(System.in);
        System.out.println();
        System.out.print("\tEnter Name : ");
        String emp_name =input.nextLine();
        System.out.print("\tPress F for Full Time or P for Part Time : ");
        char job_criteria =input.next().charAt(0);
        char select = Character.toUpperCase(job_criteria);
        System.out.println();

        if (select == 'F') {
            System.out.print("\t------ Full Time Employee ----- ");
            System.out.println();
            System.out.print("\tEnter Basic Pay :  ");
            double basic_pay = input.nextDouble();
            FullTimeEmployee emp = new FullTimeEmployee();
            emp.setName(emp_name);
            emp.setMonthlySalary(basic_pay);
            System.out.println("\n");
            System.out.println("\tName    :  " + emp.getName());
            System.out.println("\tWage    :  " + df2.format(emp.getMonthlySalary()));

            System.out.println("\n");

        } 
        else if (select == 'P') 
        {
            System.out.print("\t------ Part Time Employee ----- ");
            System.out.println("\n");
            System.out.print("\tEnter Rate Per Hour  and No. of Hours Worked  Seperated By Space     :  ");
            double rate_per_hour = input.nextDouble();
            int no_hours_work2 = input.nextInt();

            PartTimeEmployee emp = new PartTimeEmployee();
            emp.setName(emp_name);
            emp.setRatePerHour(rate_per_hour);
            emp.setHoursWorked(no_hours_work2);
            System.out.println("\tName    :  " + emp.getName());
            System.out.println("\tWage    :  " + df2.format(emp.getWage()));

            System.out.println("\n");
        } else {
            System.out.println("\n");
            System.out.print("\tInvalid Option. Please Try Again");
        }

        System.out.print("\tEnd of Program");
        System.out.println("\n");
        input.close();

    }
}


Employee.java

class Employee
{
    private String name;

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
}


PartTimeEmployee.java



class PartTimeEmployee extends Employee
{
    private double ratePerHour;
    private int hoursWorked;
    private double wage;

    public void setWage()
    {
        wage = hoursWorked * ratePerHour;
    }

    public double getWage()
    {
        setWage();
        return wage;
    }

    public void setRatePerHour(double rate)
    {
        ratePerHour = rate;
    }

    public void setHoursWorked(int hours)
    {
        hoursWorked = hours;
    }
}


FullTimeEmployee.java

class FullTimeEmployee extends Employee { private double monthlySalary; public void setMonthlySalary(double salary) { monthlySalary = salary; } public double getMonthlySalary() { return monthlySalary; } }