Tuesday, February 16, 2021

Addition of Three Numbers Using Pointers in C++

 A program that I wrote using C++ to ask the user to give three numbers and then the program will compute the sum of three numbers using pointers.

 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

// addition.cpp

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

// www.jakerpomperada.com

// www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines


#include <iostream>


int main()

{

    int a=0, b=0,c=0,sum=0; 

    

int *pointer1,*pointer2 ,*pointer3;

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

std::cout <<"\tAddition of Three Numbers Using Pointers in C++";

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

std::cout <<"\tGive Three Numbers : ";

std::cin >> a >> b >> c;

std::cout <<"\n";

    pointer1 = &a;

    pointer2 = &b;

    pointer3 = &c;

    sum =  *pointer1 + *pointer2  + *pointer3;

    std::cout <<"\n";

    std::cout<<"\tSum of Three Numbers = "<<sum;

    std::cout <<"\n";

    return 0;

}

Hello World Using a Function in C

Hello World Using a Function in C

 A simple program that I wrote to display a hello world message using a function in 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 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.



Program Listing


#include <stdio.h>


void display();


int main()

{

 display();

}


display()

{

printf("\tHello World in C using a Function");

}


Monday, February 15, 2021

Basic Math Using Radio Button in PHP

Basic Math Using Radio Buttons in PHP

 A simple program that I wrote to demonstrate basic math functions using radio buttons in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.








Program Listing

index.php

<?php 

    $chk1 = "checked";

    $infotext = $ans = $chk2 = $chk3 = $chk4 = "";

    $num1 = isset($_POST['txtNum1'])  ? floatval($_POST['txtNum1']) : "";

    $num2 = isset($_POST['txtNum2'])  ? floatval($_POST['txtNum2']) : "";

    $rad  = isset($_POST['txtRadio']) ? $_POST['txtRadio'] : "";

    $visibility = "visibility_off";


    // Display selected shape input fields

    if(isset($_POST['btnCalculate'])) {

        $visibility = "visibility_on";


        switch ($rad) {

            case "Addition":

                $ans = round(($num1 + $num2), 2);

                $infotext = '<div class="answer">'.$num1.' + '.$num2.' = '.$ans.'</div>';

                $chk1 = 'checked';

                break;

            case "Subtraction":

                $ans = round(($num1 - $num2), 2);

                $infotext = '<div class="answer">'.$num1.' - '.$num2.' = '.$ans.'</div>';

                $chk1 = "";

                $chk2 = "checked";

                break;

            case "Multiplication":

                $ans = round(($num1 * $num2), 2);

                $infotext = '<div class="answer">'.$num1.' x '.$num2.' = '.$ans.'</div>';

                $chk1 = "";

                $chk3 = "checked";

                break;

            case "Division":

                $ans = round(($num1 / $num2), 2);

                $infotext = '<div class="answer">'.$num1.' / '.$num2.' = '.$ans.'</div>';

                $chk1 = "";

                $chk4 = "checked";

                break;

        }

    }

?>

<!DOCTYPE html>

<html lang="en">

    <head>

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

        <title>Basic Math in PHP using Radio Buttons</title>

        <link rel="stylesheet" href="style.css">

    </head>

    <body>

        <main>

            <div class="container">

                <h1>Basic Math in PHP</h1>

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


                <div class="container-wrapper">

                    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" class="frmBasicMath">

                        <input type="number" step=".01" name="txtNum1" class="txtbox" value="<?php echo $num1; ?>" placeholder="Input First Number" required>

                        <input type="number" step=".01" name="txtNum2" class="txtbox" value="<?php echo $num2; ?>" placeholder="Input Second Number" required>


                        <div class="radioboxWrapper">

                            <label class="radiobox">Addition

                                <input type="radio" name="txtRadio" value="Addition" <?php echo $chk1; ?>>

                                <span class="checkmark"></span>

                            </label>

                            <label class="radiobox">Subtraction

                                <input type="radio" name="txtRadio" value="Subtraction" <?php echo $chk2; ?>>

                                <span class="checkmark"></span>

                            </label>

                            <label class="radiobox">Multiplication

                                <input type="radio" name="txtRadio" value="Multiplication" <?php echo $chk3; ?>>

                                <span class="checkmark"></span>

                            </label>

                            <label class="radiobox">Division

                                <input type="radio" name="txtRadio" value="Division" <?php echo $chk4; ?>>

                                <span class="checkmark"></span>

                            </label>

                        </div>


                        <div class="btnWrapper">

                            <a href="index.php" class="btnReset" name="btnReset">Reset</a>

                            <button type="submit" class="btnCalculate" name="btnCalculate">Calculate</button>

                        </div>


                        <?php echo $infotext; ?>

                    </form>

                </div>

            </div>

        </main>

    </body>

</html>


style.css

* {

    box-sizing: border-box;

}


body {

    font-family: "Calibri", sans-serif;

    background: #e2e1e0;

    color: #111;

}


main {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    border-radius: 50%;

}


.container {

    padding: 50px;

    width: 500px;

    background: #fff;

    

    text-align: left;

    border-radius: 25px;

}


h1 {

    margin: 0;

    text-transform: uppercase;

    line-height: 1.2;

}

h2 {

    margin: 0 0 30px;

}


.txtbox {

    display: inline-block;

    background: #f1f1f1;

    width: 100%;

    margin: 0 0 10px 0;

    padding: 15px;

    border: none;

    font-size: 22px;

}


.txtbox:focus {

    background: #eeeeee;

    outline: none;

}


.btnWrapper {

    display: inline-flex;

}


.btnReset,

button {

    background: #673ab7;

    color: #fff;

    padding: 15px;

    width: 200px;

    opacity: 0.9;

    outline: none;

    font-size: 20px;

    text-transform: uppercase;

    border: none;

    border-radius: 0 10px 10px 0;

    text-decoration: none;

    text-align: center;

    font-family: Arial, Helvetica, sans-serif;

    cursor: pointer;

    transition: all 0.3s ease-out;

}


.btnReset {

    background: #ff5722;

    border-radius: 10px 0 0 10px;

}


.btnReset:hover,

button:hover {

    opacity: 1;

}


.answer {

    width: 100%;

    padding: 20px;

    text-align: center;

    font-size: 30px;

    font-weight: bold;

    background: #9e9e9e;

    color: #fff;

    font-family: 'Times New Roman', serif;

    line-height: 1.5;

    margin-top: 20px;

    border-radius: 10px;

}


.visibility_on {

    display: block;


}


.visibility_off {

    display: none;

}


.radioboxWrapper {

    margin: 10px 0 20px;

}


.radiobox {

    width: calc(50% - 3px);

    display: inline-block;

    position: relative;

    padding-left: 35px;

    margin-bottom: 12px;

    cursor: pointer;

    font-size: 22px;

    -webkit-user-select: none;

    -moz-user-select: none;

    -ms-user-select: none;

    user-select: none;

}


.radiobox input {

    position: absolute;

    opacity: 0;

    cursor: pointer;

}


.checkmark {

    position: absolute;

    top: 0;

    left: 0;

    height: 25px;

    width: 25px;

    background-color: #eee;

    border-radius: 50%;

}


.radiobox:hover input ~ .checkmark {

    background-color: #ccc;

}


.radiobox input:checked ~ .checkmark {

    background-color: #673ab7;

}


.checkmark:after {

    content: "";

    position: absolute;

    display: none;

}


.radiobox input:checked ~ .checkmark:after {

    display: block;

}


.radiobox .checkmark:after {

    top: 9px;

    left: 9px;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #fff;

}


Sunday, February 14, 2021

Month Selector in Java

Month Selector in Java

 Machine Problem in Java

Write a program that will ask the user month based on numerical values 1,2,3,4,5,6,7,8,9,10,11 and 12 which represents January, February, March, April, May, June, July, August, September, October, November. December using Java programming language with Error Handling function.

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing


Month_Selection.java

import java.util.InputMismatchException;

import java.util.Scanner;


/**

Machine Problem in Java


Write a program that will ask the user month based on numerical values

1,2,3,4,5,6,7,8,9,10,11 and 12 which represents January, February, March,

April, May, June, July, August, September, October, November



@author Jake Rodriguez Pomperada,MAED-IT, MIT

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

jakerpomperada@gmail.com

Bacolod City, Negros Occidental Philippines

February 12, 2021  12:05 PM Friday


*/



public class Month_Selection {

static void end()

{

  

  System.out.println();

      System.out.println("\tEnd of Program");

      System.exit(0);

      

     

}

static void  display()

{

   Scanner in = new Scanner(System.in);


   

   int ch;

do {

     

  

    ch = 0;

System.out.println();

System.out.println("\tMonth Selector in Java");

System.out.println();

  System.out.print("\tEnter month's number: ");

  int monthNumber = in.nextInt();


  System.out.println();


        

        if (monthNumber == 1)


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


        else if (monthNumber == 2)


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


        else if (monthNumber == 3)


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


        else if (monthNumber == 4)


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


        else if (monthNumber == 5)


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


        else if (monthNumber == 6)


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


        else if (monthNumber == 7)


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


        else if (monthNumber == 8)


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


        else if (monthNumber == 9)


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


        else if (monthNumber == 10)


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


        else if (monthNumber == 11)


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


        else if (monthNumber == 12)


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


        else


              System.out.println("\tInvalid month. Try Again");

        

        System.out.println();

      

        try{

        System.out.print("\tContinue (Type 1 - Yes or 2 - No) : ");

       ch = in.nextInt(); 

          

        } catch (InputMismatchException e) {

        System.out.println();

        System.out.println ("\tAccepts only Numeric Values. Try Again");

        display();

         }

        

    

       

     } while (ch == 1); 

            end();

 

       

        

}



public static void main(String[] args) {

// TODO Auto-generated method stub

       

     display();

}


}


Friday, February 12, 2021

Weight Converter in PHP

Weight Converter in PHP

 A program that I wrote in PHP which allows the user to give value in kilograms and pounds  it will convert the given values to kilograms or pounds in vice versa.

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.






Program Listing


style.css

* {

    box-sizing: border-box;

}



body {

    font-family: Arial, Helvetica, sans-serif;

    background: #2B2B2B;

    color: #1a1a1a;

    font-size: 15px;

}


main {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 500px;

    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;

    border-radius: 10px;

}


.container {

    display: block;

    padding: 30px;

    background: #fff;

    text-align: left;

    border-radius: 10px;

}


.container-wrapper {

    padding: 10px;

}


.container-wrapper:first-of-type {

    margin-bottom: 10px;

}


h1, h2 {

    text-align: center;

}


h1 {

    margin: 10px 0 30px;

}


label {

    width: 100%;

}


input,

select {

    display: inline-block;

    background: #f5f5f5;

    width: 100%;

    margin: 5px 0 20px 0;

    padding: 15px;

    border: none;

    font-size: 15px;

}


input:focus,

select:focus {

    background: #eeeeee;

    outline: none;

}


.btnReset,

button {

    background: #4594E4;

    color: #fff;

    padding: 15px;

    margin: 0 0 20px;

    border: none;

    cursor: pointer;

    width: 100%;

    opacity: 0.9;

    font-size: 15px;

    outline: none;

    border:0;

}


.btnWrapper {

    display: inline-flex;

    margin: 0;

    width: 100%;

}


.btnWrapper input,

.btnWrapper .btnReset,

.btnWrapper .btnConvert {

    padding: 15px;

    border: none;

    font-size: 15px;

    margin: 0;


}

.btnWrapper input {

    width: 100%;

}


.btnReset {

    background: #2E4760;

}


.btnReset,

.btnConvert {

    width: 100px;

    text-align: center;

    text-decoration: none;

}


.btnSelect {

    background: #4EC4A2;

    width: 100px;

}


.btnReset:hover,

button:hover {

    opacity: 1;

}


.answer {

    margin: 20px 0 0;

    width: 100%;

    padding: 20px;

    text-align: center;

    font-size: 30px;

    font-weight: bold;

    background: #dadada;

    font-family: 'Times New Roman', serif;

    line-height: 1.5;

}


.visibility_on {

    display: block;


}


.visibility_off {

    display: none;

}


.frmSelect {  

    display: flex;

    flex-flow: row wrap;

    align-items: center;

}


.frmSelect select {

    vertical-align: middle;

    padding: 15px;

    margin: 5px 0 0;

    width: calc(100% - 100px);

}


.frmSelect button {

    margin: 5px 0 0;

}


.pieText {

    font-family: Serif;

}

.blueText {

    color:#2196f3;

}


index.php


<?php 

    

    $area = $html = $infotext = $sel1 = $sel2 = $sel3 = "";

    $num1 = isset($_POST['txtNum1']) ? floatval($_POST['txtNum1']) : "";

    $visibility = "visibility_off";

    $selUnit = isset($_GET['txtSelectBox']) ? $_GET['txtSelectBox'] : '';


    // Display selected shape input fields

    if(isset($_GET['txtSelectBox'])) {

        $visibility = "visibility_on";


        switch ($selUnit) {

            case "kg2lb":

                $sel1 = "selected";

                $html1 = '<h2>Kilograms &#8594; Pounds Converter</h2>';

                $html2 = '<input type="number" name="txtNum1" id="txtNum1" placeholder="Input weight in kilograms (kg)" value="'.$num1.'" required>';

                if(isset($_POST['btnConvert'])) {

                    $ans = round(($num1 * 2.20462262185), 4);

                    $infotext = '<div class="answer">'.$ans.' kg</div>';

                }

                break;

            case "lb2kg":

                $sel2 = "selected";

                $html1 = '<h2>Pounds &#8594; Kilograms Converter</h2>';

                $html2 = '<input type="number" name="txtNum1" id="txtNum1" placeholder="Input weight in pounds (lb)" value="'.$num1.'" required>';

                if(isset($_POST['btnConvert'])) {

                    $ans = round(($num1 / 2.20462262185), 4);

                    $infotext = '<div class="answer">'.$ans.' lb</div>';

                }

                break;

        }

    }

?>

<!DOCTYPE html>

<html lang="en">

    <head>

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

        <title>Weight Converter in PHP</title>

        <link rel="stylesheet" href="style.css">

    </head>

    <body>

        <main>

            <div class="container">

                <h1>Weight Converter in PHP</h1>

                <h2>Jake R. Pomperada, MAED-IT,MIT</h2>

                <div class="container-wrapper">

                    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" class="frmSelect">

                        <label for="txtSelectBox"><b>Choose the type of unit conversion:</b></label>

                        <select name="txtSelectBox" id="txtSelectBox" value="<?php echo $oper; ?>" required>

                            <option value="kg2lb" <?php echo $sel1; ?>>Kilograms &#8594; Pounds</option>

                            <option value="lb2kg" <?php echo $sel2; ?>>Pounds &#8594; Kilograms</option>

                        </select>


                        <button type="submit" class="btnSelect">Select</button>

                    </form>

                </div>

                <div class="container-wrapper <?php echo $visibility; ?>">

                    <form action="" method="post" class="frmAreaCalculate">

                        <?php echo $html1; ?>

                        

                        <div class="btnWrapper">

                            <?php echo $html2; ?>

                            <a href="index.php" type="button" name="btnReset" class="btnReset">Reset</a>

                            <button type="submit" name="btnConvert" class="btnConvert">Convert</button>

                        </div>


                        <?php echo $infotext; ?>

                    </form>

                </div>

            </div>

        </main>

    </body>

</html>

Color Combination in Java

Color Combination in Java

  Machine Problem in Java

THE primary colors problem All of the colours that you see in  your monitor can be represented by a combination of the basic  colours “red”, “green”, and “blue”: yellow = red + green magenta = blue

 + red cyan = green + blue Write a program that accepts the names   of two different basic colours and determines the colour formed by   a combination of the two. example: Enter a combination color: green 

 blue The result color is Cyan or Enter a combination color: blue green   The result color is Cyan.

RGB Color combination

red + green = yellow.

red + blue = magenta.

green + blue = cyan.


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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.










Program Listing


/**

 Machine Problem in Java


THE primary colors problem All of the colours that you see in 

your monitor can be represented by a combination of the basic 

colours “red”, “green”, and “blue”: yellow = red + green magenta = blue

 + red cyan = green + blue Write a program that accepts the names 

 of two different basic colours and determines the colour formed by 

 a combination of the two. example: Enter a combination color: green 

 blue The result color is Cyan or Enter a combination color: blue green 

 The result color is Cyan.


RGB Color combination

red + green = yellow.

red + blue = magenta.

green + blue = cyan.




 @author Jake Rodriguez Pomperada,MAED-IT, MIT

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

 jakerpomperada@gmail.com

 Bacolod City, Negros Occidental Philippines

 February 12, 2021  12:05 PM Friday

 

 */

 

import java.util.*;  


public class Color_Selection {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

Scanner sc= new Scanner(System.in); 

String color = "";

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

System.out.println("\tColor Combination in Java");

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

System.out.print("\tEnter a Combination Color : ");  

color= sc.nextLine();

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

if (color.toLowerCase().equals("blue green")) {

System.out.println("\tThe result color is Cyan.");

} else if (color.toLowerCase().equals("green blue")) {

System.out.println("\tThe result color is Cyan.");

} else if (color.toLowerCase().equals("red green")) {

System.out.println("\tThe result color is Yellow.");

} else if (color.toLowerCase().equals("green red")) {

System.out.println("\tThe result color is Yellow.");

}else if (color.toLowerCase().equals("red blue")) {

System.out.println("\tThe result color is Magenta.");

} else if (color.toLowerCase().equals("blue red")) {

System.out.println("\tThe result color is Magenta.");

}else {

System.out.println("\tWrong Color Combination. Try Again.");

}

  System.out.println();

      System.out.println("\tEnd of Program");

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

       sc.close();

}

} // End of Code


Wednesday, February 10, 2021

03.Secret History of Windows Task Manager - Part 3 - Source Code

Temperature Converter in PHP

Temperature Converter in PHP

 A program that allows the user to select temperature celsius to Fahrenheit and vice versa 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.





Program Listing

style.css

* {
    box-sizing: border-box;
}


body {
    font-family: Arial, Helvetica, sans-serif;
    background: url("double-bubble-outline.png") #fefefe repeat;
    color: #1a1a1a;
    font-size: 15px;
}

main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    border-radius: 10px;
}

.container {
    display: block;
    padding: 30px;
    background: #fff;
    text-align: left;
    border-radius: 2px;
}

h1, h2 {
    text-align: center;
}

label {
    width: 100%;
}

input,
select {
    display: inline-block;
    background: #f5f5f5;
    width: 100%;
    margin: 5px 0 20px 0;
    padding: 15px;
    border: none;
    font-size: 15px;
}

input:focus,
select:focus {
    background: #eeeeee;
    outline: none;
}

.btnReset,
button {
    background: #2196f3;
    color: #fff;
    padding: 15px;
    margin: 0 0 20px;
    border: none;
    cursor: pointer;
    width: 100%;
    opacity: 0.9;
    font-size: 15px;
    outline: none;
    border:0;
}

.btnWrapper {
    display: flex;
    margin: 0 0 20px;
}

.btnReset {
    background: #4caf50;
}

.btnReset,
.btnConvert {
    width: 50%;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin: 0;
}

.btnSelectShape {
    background: #f44336;
}

.btnReset:hover,
button:hover {
    opacity: 1;
}

.answer {
    width: 100%;
    padding: 20px;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    background: #dadada;
    font-family: 'Times New Roman', serif;
    line-height: 1.5;
}

.visibility_on {
    display: block;

}

.visibility_off {
    display: none;
}

.frmTempSelect {  
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.frmTempSelect select {
    vertical-align: middle;
    padding: 15px;
    margin: 5px 0 0;
    width: calc(100% - 100px);
}

.frmTempSelect button {
    width: 100px;
    margin: 5px 0 0;
}

.pieText {
    font-family: Serif;
}
.blueText {
    color:#2196f3;
}


index.php

<?php 
  /* Temperature Converter in PHP
     Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
     www.jakerpomperada.com  / www.jakerpomperada.blogspot.com
     jakerpomperada@gmail.com 
     Bacolod City, Negros Occidental Philippines
   */

    $area = $html = $infotext = $sel1 = $sel2 = $sel3 = "";
    $num1 = isset($_POST['txtNum1']) ? floatval($_POST['txtNum1']) : "";
    $visibility = "visibility_off";
    $frmArea = isset($_GET['selectArea']) ? $_GET['selectArea'] : '';

    // Display selected shape input fields
    if(isset($_GET['selectArea'])) {
        $visibility = "visibility_on";

        switch ($frmArea) {
            case "ctof":
                $sel1 = "selected";
                $html = '<h2>Celsius &#8594; Fahrenheit Converter</h2>
                        <label for="txtNum1"><b>Input Temparature in &#8451;:</b></label>
                        <input type="number" name="txtNum1" id="txtNum1" value="'.$num1.'" required>';
                if(isset($_POST['btnConvert'])) {
                    $temp = round((($num1 * (9/5))+32), 2);
                    $infotext = '<div class="answer">(<span class="blueText">'.$num1.'</span> x <sup>9</sup>&#8260;<sub>5</sub>) + 32 = '.$temp.' &#8457;</div>';
                }
                break;
            case "ftoc":
                $sel2 = "selected";
                $html = '<h2>Fahrenheit &#8594; Celsius Converter</h2>
                        <label for="txtNum1"><b>Input Temparature in &#8457;:</b></label>
                        <input type="number" name="txtNum1" id="txtNum1" value="'.$num1.'" required>';
                if(isset($_POST['btnConvert'])) {
                    $temp = round((($num1 - 32) * (5/9)), 2);
                    $infotext = '<div class="answer">(<span class="blueText">'.$num1.'</span> - 32) x <sup>5</sup>&#8260;<sub>9</sub> = '.$temp.' &#8451;</div>';
                }
                break;
        }
    }
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Temperature Converter in PHP</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <main>
            <div class="container">
                <h1>Temperature Converter in PHP</h1>
                <h2>Mr. Jake R. Pomperada, MAED-IT, MIT</h2>
            </div>

            <div class="container">
                <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" class="frmTempSelect">
                    <label for="selectArea"><b>Select Unit of Temperature:</b></label>
                    <select name="selectArea" id="selectArea" value="<?php echo $oper; ?>" required>
                        <option value="ctof" <?php echo $sel1; ?>>Celsius &#8594; Fahrenheit</option>
                        <option value="ftoc" <?php echo $sel2; ?>>Fahrenheit &#8594; Celsius</option>
                    </select>

                    <button type="submit" class="btnSelectShape">Select</button>
                </form>
            </div>

            
            <div class="container <?php echo $visibility; ?>">
                <form action="" method="post" class="frmAreaCalculate">
                    <?php echo $html; ?>
                    
                    <div class="btnWrapper">
                        <a href="index.php" type="button" name="btnReset" class="btnReset">Reset</a>
                        <button type="submit" name="btnConvert" class="btnConvert">Convert</button>
                    </div>

                    <?php echo $infotext; ?>
                </form>
            </div>
        </main>
    </body>
</html>

Tuesday, February 9, 2021

Do You Want To Continue in Java

 I wrote this program to show how to create do you want to continue 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 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

addition.java


import java.util.Scanner;

public class Addition {

public static void main(String[] args) {
   int num1, num2, sum;
   
   Scanner sc = new Scanner(System.in);
       
       char ch;
       
       do {
       
    System.out.println("\n");
    System.out.print("\t\tAddition of Two Numbers in Java");
    System.out.println("\n");
    System.out.print("\t\tDo You Want To Continue in Java");
    System.out.println("\n");
    
        System.out.print("\tEnter First Number: ");
        num1 = sc.nextInt();
        
        System.out.print("\tEnter Second Number: ");
        num2 = sc.nextInt();
        
     
        sum = num1 + num2;
        
        System.out.print("\n");
        System.out.print("\tThe sum of " + num1 + " and " 
                  + num2 + " is "+ sum + ".");
        
        System.out.println("\n");
        System.out.print("\tDo you want to continue (Type y or n) : ");
      ch = sc.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
        System.out.println();
        System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
        System.out.println("\n");
        sc.close();
}

}