Monday, November 8, 2021

Addition of Five Numbers in PHP

 A simple program that I wrote in PHP to ask the user to give five numbers and then the program will compute the sum of five numbers, and display the result 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 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

<?php

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

        $sum = $_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>Addition of 5 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($sum)){

            echo '<div class="container">

                    <h1>Addition of Five Numbers in PHP</h1>

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

                    

                    <div class="output_wrapper">

                        <p>The sum of '

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

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

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

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

                            $_POST["input5"] .

                        ' is: </p>

                        <h2 class="output">'.$sum.'</h2>

                    </div>


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

                </div>';

        } else {

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

                    <h1>Addition of 5 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>


Sunday, November 7, 2021

Grade Solver Using JOptionPane in Java

Machine Problem

Write a Java program that will ask the user to give grades in prelim, midterm, and endterm  period, and then the program will compute the final grade, 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 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

Grade_Solver.java

package test;


/*

* Jake Rodriguez Pomperada, MAED-IT, MIT

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

* jakerpomperada@gmail.com

* Bacolod City, Negros Occidental Philippines

* November 7, 2021  Sunday  10:03 AM

* Machine Problem

* Write a Java program that will ask the user to give grades in prelim, midterm, and endterm 

* period, and then the program will compute the final grade, and display the results on the screen.

*

** 

*/



import javax.swing.*;

import javax.swing.JOptionPane;


public class Grade_Solver {



public static void main(String args[]) {


final JPanel panel = new JPanel();

String input1,input2,input3;


double prelim=0.00, midterm=0.00;

double endterm=0.00;


double compute=0.00;


String reply="n";


do

{



    JOptionPane.showMessageDialog(panel, "           Grade Solver Using JOptionPane in Java   \n\n"

        + "                              Created By     \n\n"

        + "Prof. Jake Rodriguez Pomperada, MAED-IT, MIT\n\n", "About This Program",

        JOptionPane.INFORMATION_MESSAGE);

    

input1 = JOptionPane.showInputDialog(null,"Enter Prelim Grade :");

prelim=Double.parseDouble(input1);

input2 = JOptionPane.showInputDialog(null,"Enter Midterm Grade :  ");

midterm=Double.parseDouble(input2);


input3 = JOptionPane.showInputDialog(null,"Enter Endterm Grade : ");

endterm=Double.parseDouble(input3);



compute = (prelim * 0.20) + (midterm* 0.30) + (endterm * 0.50);


JOptionPane.showMessageDialog(null,"Final Grade : " + Math.round(compute) );


reply = JOptionPane.showInputDialog(null,"Try Again? (press y or n) ");

}while (reply.matches("y") || reply.matches("Y") );


JOptionPane.showMessageDialog(null,"End of Program"  );



}

}



Prelim Grade Solver in Java

 Machine Problem

Write a Java program that will ask the user to give grades in quizzes, assignments, activities, and prelim exams, and then the program will compute the prelim grade  of the student, and display the result 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 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


Prelim_Grade.java


package test;


/*

* Jake Rodriguez Pomperada, MAED-IT, MIT

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

* jakerpomperada@gmail.com

* Bacolod City, Negros Occidental Philippines

* November 7, 2021  Sunday   8:36 AM

* Machine Problem

* Write a Java program that will ask the user to give grades in quizzes, assignments,

* activities, and prelim exams, and then the program will compute the prelim grade

* of the student, and display the result on the screen.

*/



import javax.swing.*;

import javax.swing.JOptionPane;


public class Prelim_Grade {



public static void main(String args[]) {


final JPanel panel = new JPanel();

String input1,input2,input3,input4;


double quiz=0.00, assignment=0.00;

double activities=0.00, prelim_exam=0.00;


double compute=0.00;


String reply="n";


do

{



    JOptionPane.showMessageDialog(panel, "               Prelim Grade Solver in Java   \n\n"

        + "                              Created By     \n\n"

        + "Prof. Jake Rodriguez Pomperada, MAED-IT, MIT\n\n", "About This Program",

        JOptionPane.INFORMATION_MESSAGE);

    

input1 = JOptionPane.showInputDialog(null,"Enter  Quiz Grade :");

quiz=Double.parseDouble(input1);

input2 = JOptionPane.showInputDialog(null,"Enter Assignment Grade :  ");

assignment=Double.parseDouble(input2);


input3 = JOptionPane.showInputDialog(null,"Enter Activites Grade : ");

activities=Double.parseDouble(input3);



input4 = JOptionPane.showInputDialog(null,"Enter Prelim Exam Grade : ");

prelim_exam=Double.parseDouble(input4);



compute = (quiz * 0.20) + (assignment * 0.10) + (activities * 0.30) + (prelim_exam * 0.40);


JOptionPane.showMessageDialog(null,"Prelim Grade : " + Math.round(compute) );


reply = JOptionPane.showInputDialog(null,"Try Again? (press y or n) ");

}while (reply.matches("y") || reply.matches("Y") );


JOptionPane.showMessageDialog(null,"End of Program"  );



}

}

Saturday, November 6, 2021

Box Constructors in Java

Box Constructors in Java

 Machine Problem in Java

Create a class named Box that includes integer data fields for length,  width, and height. Create three Constructors that requires one, two,   and three parameters, respectively. 

When one argument is passed to the constructor, assign it to length, assign zeros to height 

and width, and display "Line Created".    When two arguments are used, assign them to length and width, assign zero   to height, and  display "Rectangle created". 

  When three arguments are used,    assign them to the three variables and display "Box created". 

 Save this file as Box.java. Create an application named   Text Box that demonstrates each method works correctly.  Save the application as TestBox.java

  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


Box.java

package test;


/*

*  Box.java

* Jake Rodriguez Pomperada, MAED-IT, MIT

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

* jakerpomperada@gmail.com

* Bacolod City, Negros Occidental Philippines

* Machine Problem

* Create a class named Box that includes integer data fields for length, 

 width, and height. Create three Constructors that requires one, two, 

and three parameters, respectively. When one argument is passed to

 the constructor, assign it to length, assign zeros to height 

 and width, and display "Line Created". 

 

 When two arguments are used, assign them to length and width, 

 assign zero to height, and

 display "Rectangle created". 

 

 When three arguments are used,  

 assign them to the three variables and display "Box created". 

 Save this file as Box.java. Create an application named Text Box that 

 demonstrates each method works correctly.

 Save the application as TestBox.java

 

*/


class Box {


    int length;

    int width;

    int height;

    

   

    Box(int length)

    {

    this.length = length;

         this.height = 0;

         this.width  = 0;

         System.out.println();

         System.out.print("\tLine Created");

         

     }

     

    

    Box(int length, int width)

    {

    this.length = length;

         this.width  = width;

         this.height = 0;

         System.out.println();

         System.out.print("\tRectangle created");

     }

     

    

    Box(int length, int width, int height)

    {

    this.length = length;

         this.width  = width;

         this.height = height;

         System.out.println();

         System.out.print("\tBox created");

     }

    

    

    public int getLenght() {

    return length;

     }

    

    public int getLenght_getWidth() {

      return(length * width);

       }

      

    public int  getLenght_getWidth_getHeight()

    {

    return(length * width * height);

    }

    

   

  

}

 

Textbox.java


package test;


/*

*  TextBox.java

* Jake Rodriguez Pomperada, MAED-IT, MIT

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

* jakerpomperada@gmail.com

* Bacolod City, Negros Occidental Philippines

* Machine Problem

* Create a class named Box that includes integer data fields for length, 

 width, and height. Create three Constructors that requires one, two, 

 and three parameters, respectively. When one argument is passed to

 the constructor, assign it to length, assign zeros to height 

 and width, and display "Line Created". 

 

 When two arguments are used, assign them to length and width, 

 assign zero to height, and

 display "Rectangle created". 

 

 When three arguments are used,  

 assign them to the three variables and display "Box created". 

 Save this file as Box.java. Create an application named Text Box that 

 demonstrates each method works correctly.

 Save the application as TestBox.java

 

*/




public class TestBox {


public static void main(String[] args) {

// TODO Auto-generated method stub

    System.out.println();

        System.out.println("\tBox Constructors in Java");

  

     /* create boxes using the various constructors */

        Box mybox1 = new Box(12);

        Box mybox2 = new Box(4,2);

        Box mybox3 = new Box(5,6,8);

        

      

        mybox1.getLenght();

        mybox2.getLenght_getWidth();

        mybox3.getLenght_getWidth_getHeight();

        

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

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

        System.out.println();

}


}


Palindrome Number in Java

Palindrome Number in Java

 A simple program to ask the user to give a number and then the program check if the given number is a palindrome or not a palindrome 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.






Program Listing

package test;

import java.util.Scanner;

public class Palindrome_Number {
	
	public static void main(String args[]) 
	{
	
	
	Scanner input=new Scanner(System.in);
	
	System.out.println();
    System.out.println("\tPalindrome Number in Java");
    System.out.println();
   
	System.out.print("\tGive a Number : ");
		
	int num=input.nextInt();
    int r,sum=0;
    int temp=num;    
    while(num>0)
    {    
    r=num%10;    
    sum=(sum*10)+r;    
    num=num/10;    
    }    
	
	
	System.out.println("\n");
	if(temp==sum)
	{
	System.out.println("\tThe given number " + temp + " is a Palindrome.");
	}
	else
	{
		System.out.println("\tThe given number " + temp + " is Not a Palindrome.");
	}
	 System.out.println();
     System.out.print("\tEnd of Program \n");  
     System.out.println();
	input.close();
}

}


Friday, November 5, 2021

US Dollar To Philippine Peso in VB NET

US Dollar To Philippine Peso in VB.NET

 A simple program I will demonstrate how to convert US Dollar To Philippine Peso Using VB.NET.

  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


Public Class Form1


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim convert_pesos As Double


        convert_pesos = Val(TextBox1.Text) * 50.77


        Label2.Text = "$" & Math.Round(Val(TextBox1.Text), 2) & " US Dollar is equivalent to  PHP " & Math.Round(convert_pesos, 2)

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        TextBox1.Text = ""

        Label2.Text = " "

        TextBox1.Focus()

    End Sub


    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        End

    End Sub

End Class


US Dollar To Philippine Peso in Pascal

US Dollar To Philippine Peso in Pascal

 A program that I wrote that will ask money in US Dollar value and convert it into Philippine Peso equivalent.

  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

Program US_Dollar_Philippine_Peso;

Uses Crt;


Var

  Choice : Char;

  US_Dollar : Real;


Procedure convert_Philippine_Peso(var US_Dollar: Real);

Var

  Convert : Real;


Begin

 Convert := US_Dollar * 50.77;

 writeln('$',US_Dollar:5:2,' is equivalent to PHP ',Convert:5:2);

End;


Begin

  Clrscr;

  Choice := 'Y';

  Writeln;

  Writeln;

  Write('US Dollar To Philippine Peso in Pascal');

  Writeln;

  Writeln;

  While upcase(Choice) = 'Y' Do

    Begin

     Writeln;

     Write('Enter US Dollar Value : ');

     Readln(US_Dollar);

     Writeln;

     convert_Philippine_Peso(US_Dollar);

     writeln;

     Writeln;

     Write('Continue [Y/N] ');

     readln(choice);

     Writeln;

    End;

    Writeln;

    Write('End of Program');

    Writeln;

  Readln;

End.


Thursday, November 4, 2021

How To Write a Book

Sum of Three Numbers in C#

Sum of Three Numbers in C#

  Write a program that reads from the console three numbers of type int and prints their sum.

  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

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;


/* 

 * Write a program that reads from the console three numbers of type int and prints their sum. */



namespace ConsoleApplication1

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.Write("\n\n");

            Console.Write("\tSum of Three Numbers in C#");

            Console.Write("\n\n");

            Console.Write("\tEnter First Number: ");

            int a = Int32.Parse(Console.ReadLine());

            Console.Write("\tEnter Second number: ");

            int b = Int32.Parse(Console.ReadLine());

            Console.Write("\tEnter Third number: ");

            int c = Int32.Parse(Console.ReadLine());

            Console.Write("\n");

            Console.WriteLine("\tThe sum of {0}, {1}, and {2} is {3}.",a,b ,c, (a + b + c));

            Console.Write("\n");

            Console.Write("\tEnd of Program");

            Console.ReadKey();

        }

    }

}


Na Monitize Ang YouTube Channel Ko

Wednesday, November 3, 2021

Largest of Three Numbers in C

Largest of Three Numbers in C

 A simple program that will ask the user to give three numbers and then the program will check and determine which of the three given numbers has a largest numerical value.

  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

/* largest.c

   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

   jakerpomperada.blogspot.com  and jakerpomperada.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines

*/


#include <stdio.h>


int main()

{

    int val_1=0, val_2=0, val_3=0;

    int largest = 0;

        

    printf("\n\n");

    printf("\tLargest of Three Numbers in C");

    printf("\n\n");

    printf("\tGive First Value  : ");

    scanf("%d", &val_1);

    printf("\tGive Second Value : ");

    scanf("%d", &val_2);

    printf("\tGive Third Value  : ");

    scanf("%d",&val_3);

    

    largest =((val_1>val_2 && val_1>val_3)?val_1:(val_2>val_3)?val_2:val_3);

    

    printf("\n");

printf("\tThe Largest Number is %d.",largest);

printf("\n\n");

    printf("\tEnd of Program");

    printf("\n");


}








How To Monetize Your Video's in YouTube

Celsius To Fahrenheit in Pascal