Categories
Java

Average Score in Java

 A simple program that I wrote using Java programming language to compute the average score given by the user.

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

Sample Program Output

/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * October 20, 2020   Monday
 */


import java.util.Scanner; 
public class Average_Score {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		int score1, score2, score3, score4, score5 ;  
	    double average;              
	    char repeat;                 
	    String input;                
	      
	      	      
	      Scanner keyboard = new Scanner(System.in);
	      
	      
	      do
	      {
	      
	       System.out.println("\n");
		  System.out.print("\t\tAverage Score in Java");
 	      System.out.println("\n");
	      
	      	         
	         System.out.print("\tEnter Score No. 1 : ");
	         score1 = keyboard.nextInt();
	         

	         System.out.print("\tEnter Score No. 2 : ");
	         score2 = keyboard.nextInt();
	         

	         System.out.print("\tEnter Score No. 3 : ");
	         score3 = keyboard.nextInt();
	         
	         System.out.print("\tEnter Score No. 4 : ");
	         score4 = keyboard.nextInt();
	         
	         
	         System.out.print("\tEnter Score No. 5 : ");
	         score5 = keyboard.nextInt();
	         	         
	         keyboard.nextLine();

	          average = (score1 + score2 + score3 + score4 + score5) / 5.0;
	          System.out.println();
	         System.out.println("\tThe average score is " + average);
	         System.out.println();   

	         System.out.print("\tContinue Y for yes or N for no: ");
	         input = keyboard.nextLine();  
	         repeat = input.charAt(0);     

	      } while (repeat == 'Y' || repeat == 'y');
	      System.out.print("\n\n");
		  System.out.println("\tEnd of Program");
		  System.out.println("\n\n");
	}

}

Categories
Java

Compound Interest in Java

A Java program that I wrote to ask the user to give the principal amount, rate, and years to be paid by the user.

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

Sample Program Output
/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * October 20, 2020   Monday
 */


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

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub

  		  Scanner input = new Scanner(System.in);
				 	      
	      System.out.println("\n");
		  System.out.print("\t\tCompound Interest m in Java");
 	      System.out.println("\n");
	      
	      System.out.print("\tEnter Principal Amount   :  ");
	      double principal_amt = input.nextDouble();
    
	      System.out.print("\tEnter Interest Rate      :  ");
	      double rate = input.nextDouble();
    
	      System.out.print("\tEnter Number of Years    :  ");
	      double time = input.nextDouble();
    
	        // Calculate compound interest rate here 
	      
	      double CI = principal_amt * 
	                 (Math.pow((1 + rate / 100), time));
	        
	     System.out.print("\n");
	     System.out.println("\tThe Compound Interest is $  "+ df2.format(CI)); 
	     System.out.print("\n\n");
		 System.out.println("\tEnd of Program");
		 System.out.println("\n\n");
		
	}

}
Categories
Java

Payroll Program in Java

 I wrote this java program to compute the salary of an employee in the company.

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.

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.

Program Listing

/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * October 19, 2020   Monday
 */


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

public class Payroll_Program {

	/**
	 * @param args
	 */
	
	 private static DecimalFormat df2 = new DecimalFormat("#.###");

	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		  String emp_name;         
	      int hours;           
	      double payRate;      
	      double grossPay;     
	      

	      Scanner input = new Scanner(System.in);
	      
	      System.out.println("\n");
		  System.out.print("\t\tPayroll Program in Java");
  	      System.out.println("\n");
	      
	      System.out.print("\tGive Employees Name :  ");
	      emp_name = input.nextLine();
     
	      System.out.print("\tHow many hours did you work this week? : ");
	      hours = input.nextInt();
	      
	      
	      System.out.print("\tWhat is your hourly pay rate? : ");
	      payRate = input.nextDouble();
	      
	       grossPay = hours * payRate;
	      
	      System.out.print("\n");
	      System.out.print("\t===== Display Records =====");
	      System.out.print("\n\n");
	      System.out.println("\tEmployees Name :  " + emp_name);
	      System.out.println("\tGross Pay      : PHP " + df2.format(grossPay));
	      System.out.print("\n\n");
		  System.out.println("\tEnd of Program");
	       System.out.println("\n\n");
	}

}
Categories
C++

Addition and Subtraction Using Function in C++

 I wrote this program to ask the user to give two numbers and then the program will compute the sum and difference of the two numbers using functions in 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.
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.

Program Listing

/*  add_subtraction.cpp
    Author   : Mr. Jake Rodriguez Pomperada,MAED-IT, MIT
    Date     : October 13, 2020  Tuesday  9:08 PM
    Tools    : CodeBlocks IDE and C++ Compiler
    Website  : www.jakerpomperada.com / www.jakerpomperada.blogspot.com
    Email    : jakerpomperada@gmail.com
    Location : Bacolod City, Negros Occidental Philippines.
*/

#include <iostream>

using namespace std;

int addition(int a, int b)
{
   return(a+b);
}

int subtraction(int c, int d)
{

  return(c-d);

}

int main(void) {

    int x=0,y=0;

    cout <<"\n\n";
    cout << "\tAddition and Subtraction Using Function in C++";
    cout <<"\n\n";
    cout <<  "\tGive Two Numbers : ";
    cin >> x >> y;
    cout <<"\n\n";
    cout <<"\tDisplay Results";
    cout <<"\n\n";
    cout <<"\tThe sum of " << x << " and " << y << " is "
         << addition(x,y) << ".\n\n";
    cout <<"\tThe difference between " << x << " and " << y << " is "
         << subtraction(x,y) << ".\n";
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n\n";

}
Categories
Java

Swapping of Two Numbers in Java

 I wrote this Java program to ask the user to give two numbers and then the program will swap the arrangement of two numbers given by the user 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.
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.

Program Listing

import java.util.Scanner;

/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com  / www.jakerpomperada.blogspot.com
 * Bacolod City, Negros Occidental
 * October 13, 2020   Tuesday
 */

public class Swapping_Numbers {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner input = new Scanner(System.in);

  	    int temp=0;
		System.out.println("\n");
	     System.out.print("\t\tSwapping of Two Numbers in Java");
		 System.out.println("\n");
         System.out.print("\tGive First Value :  ");
          
         int a = input.nextInt();
       
         System.out.print("\tGive Second Value :  ");
         
         int b = input.nextInt();
       
         System.out.println("\n");
     
       
       System.out.println("\tValues Before Swapping : a, b = "+a+", "+ + b);
       
       // Perform Swapping Here
       temp = a;
       a = b;
       b = temp;   
       
       System.out.println();
      System.out.println("\tValues After Swapping : a, b = "+a+", "+ + b);
       System.out.print("\n");
  		System.out.println("\tEnd of Program");
       System.out.println("\n\n");

	}

}

Categories
Java

Leap Year Checker in Java

 I will show you how to write a Java program that takes a year from the user and print whether that year is a leap year or not.

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


Program Listing


/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * October 12, 2020   Monday
 */


import java.util.Scanner;

public final class Leap_Year_Checker {

	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);

    	 System.out.println("\n");
	     System.out.print("\t\tLeap Year Checker in Java");
		 System.out.println("\n");
         System.out.print("\tGive a Year :  ");
               
         int year = input.nextInt();

        boolean x = (year % 4) == 0;
        boolean y = (year % 100) != 0;
        boolean z = ((year % 100 == 0) && (year % 400 == 0));
        
        System.out.print("\n\n");
   		
        if (x && (y || z))
        {
         System.out.println("\tThe give year is " + year + " is a leap year.");
        }
        else
        {
        System.out.println("\tThe give year is " + year + " is not a leap year.");
        }
        System.out.print("\n\n");
   		System.out.println("\tEnd of Program");
        System.out.println("\n\n");
	}

}
Categories
JavaScript

Swapping Two Numbers in JavaScript

I will show you how to write a JavaScript program to ask two numbers and then the program will swap the arrangement of the two numbers. 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.
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.


Program Listing

<!DOCTYPE html>
<html>
<head>
<script>
function swapping(){
var a,b,c;
a=Number(document.getElementById("first").value);
b=Number(document.getElementById("second").value);
c=a;
a=b;
b=c;
document.getElementById("answer1").value= a;
document.getElementById("answer2").value= b;
}

function clear_all(){
document.getElementById("first").value= "";
document.getElementById("second").value= "";
document.getElementById("answer1").value= "";
document.getElementById("answer2").value= "";
document.getElementById("first").focus();
}
</script>
<style>
	body {
		font-family: arial;
		size : 15px;
	};
</style>
</head>
<body>
<h2> Swapping Two Numbers in JavaScript </h2>
<h3> Before Swapping of Two Numbers </h3>
Give First Value  : <input id="first" 
onkeypress="return event.charCode >= 48 && event.charCode <= 57">
Give Second Value : <input id="second" 
onkeypress="return event.charCode >= 48 && event.charCode <= 57"></br></br>
<button onclick="swapping()">Swap</button>
&nbsp;&nbsp;
<button onclick="clear_all()">Clear</button></br></br>
<h3> After Swapping of Two Numbers </h3>
Give First  Value  : <input id="answer1"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" readonly>
Give Second Value  :  <input id="answer2"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" readonly>
</body>
</html>
Categories
JavaScript

Addition of Two Numbers in JavaScript

In this article, I will show you how to write a JavaScript program to add the sum of two given numbers by user.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675. Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Program Listing

<doctype html>
<html>
<head>
	<style>
		body {
			font-family: arial;
		}
   </style>		
<script>
function add(){
var a,b,c;
a=Number(document.getElementById("first").value);
b=Number(document.getElementById("second").value);
c= a + b;
document.getElementById("answer").value= c;
}
</script>
</head>
<body>
<h3> Addition of Two Numbers in JavaScript </h3><br>
Give the First number : <input id="first"><br>
Give the Second number: <input id="second"><br><br>
The result <input id="answer"><br><br>
<button onclick="add()">Add</button>
</body>
</html>
Categories
PHP

Addition of Two Numbers in PHP

 A simple program to add the sum of two numbers in php programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output
index.php

<html>
  <head>
    <title>Addition of Two Numbers in PHP </title>
   </head>
   <style>
     body {
     	font-family: arial;
     	size : 12px;
       }
   </style>
   <body>
   	  <?php
   	  $a=100;  $b=20;

   	  $sum = ($a+$b);

	  echo "<h4> Addition of Two Numbers in PHP </h4>";
	  $a_display = '$a';
	  $b_display = '$b';
      echo "The value in variable is $a_display is $a.<br>";
      echo "The value in variable is $b_display is $b.<br>";
   	  echo "<h4> The sum of $a and $b is $sum.<h4>";
   	 ?>
   </body>
   </html>	  
       

Categories
Java

Product of Two Numbers in Java

 A simple program that I wrote using Java programming language that will ask the user to give two numbers and then the program will compute the product of two numbers and display the results on the screen.I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output

/* Product.java
 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT
 * Email  : jakerpomperada@gmail.com
 * Place  : Bacolod City, Negros Occidental Philippines
 */

import java.util.Scanner;

public class Product {
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		  
		  System.out.println();
		  System.out.println("\tProduct of Two Numbers in Java");
		  System.out.println();
		  System.out.print("\tGive First Number: ");
		  int num1 = in.nextInt();
		   
		  System.out.print("\tGive Second Number: ");
		  int num2 = in.nextInt();
		   
		  System.out.println();
		  System.out.println("\t"+ num1 + " x " + num2 + " = " + num1 * num2);
		  System.out.println();
		  System.out.println("\tEnd of Program");
		  System.out.println("\n\n");
	}

}