Sunday, October 4, 2020

Login System in PHP and MySQL

 A login system that I wrote using PHP and MySQL. It already uses mysqli procedural code for sql statements. I hope you will find my work useful.

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


Program Listing

connect_to_database.php

<?php
$conn = mysqli_connect("localhost","root","","login") or die(mysql_error()); 
mysqli_select_db($conn,"login");

?> 

login.php

<?php
include 'connect_to_database.php'; //connect the connection page
if(empty($_SESSION)) // if the session not yet started 
   session_start();


if(isset($_SESSION['username'])) { // if already login
   header("location: home.php"); // send to home page
   exit; 
}

?>
<html>
<head></head>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
}
   input, button, select, option, textarea {
    font-size: 100%;
}

</style>
<br>
<h2>Login System in PHP and MySQL</h2>
 Created By
 Mr. Jake Rodriguez Pomperada,MAED-IT,MIT
<br><br><br>
<form action = 'login_process.php' method='POST'>
 Username:   &nbsp;
 <input type="text" name="username" 
 placeholder="Your Username" required/>  <br><br>
 Password: &nbsp;
 <input type="password" name="password"
 placeholder="Your Password" required />
<br> <br>
<input type = "submit" name="submit" value="Ok" />  
</form>
</body>
</html>

login_process.php

<html>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
}
</style>
<?php
//error_reporting(0);
include 'connect_to_database.php'; //connect the connection page
  
if(empty($_SESSION)) // if the session not yet started 
   session_start();
if(!isset($_POST['submit'])) { // if the form not yet submitted
   header("Location: login.php");
   exit; 
}
//check if the username entered is in the database.

$username = $_POST['username'];

$test_query = "SELECT * FROM users WHERE username = '$username'";

$query_result = mysqli_query($conn,$test_query);

// query to get the users lastname and firstname to be display in the main page
$test_query2 = "SELECT lastname,firstname FROM users WHERE  username = '$username'";

$query_result2 = mysqli_query($conn,$test_query);

//conditions
if(mysqli_num_rows($query_result)===0) {
//if username entered not yet exists
    echo "<font name='arial'> <font size='5'>";
    echo "<br>";
    echo "<h2>The username that you have given is invalid. Please try again.</h2";
    echo "<br><br><br><br>";
    echo "<a href='logout.php'>Return To Login Page</a> " ;
    echo "</font></font>";
}else {

    $password = $_POST['password'];
//if exists, then extract the password.
    while($row_query = mysqli_fetch_array($query_result)) {
        // check if password are equal
        if($row_query['password']==$password){
         
         while($row_query2 = mysqli_fetch_array($query_result2)) {
   
             $_SESSION['username'] = $_POST['username'];
             // This two line of code will able us to retrieve the lastname
                 // and firstname of the user we just login.
                 $_SESSION['lastname'] = $row_query2['lastname'];
             $_SESSION['firstname']= $row_query2['firstname'];
                 header("Location: home.php");
                 exit;
             } 
        } else{ // if not a valid user  
            echo "<br>";
            echo "<h2> Invalid Password !!! Try Again </h2>"; 
            echo "<br>";
            echo "<font name='arial'> <font size='5'>";
            echo "<a href='logout.php'>Return To Login Page</a> " ;
            echo "</font></font>";
        }
    }
}
?>

</body>
</html>

home.php

<?php
include 'connect_to_database.php'; //connect the connection page

if(empty($_SESSION)) // if the session not yet started 
   session_start();

if(!isset($_SESSION['username'])) { //if not yet logged in
   header("Location: login.php");// send to login page
   exit;
?>
<html>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
    }
input, button, select, option, textarea {
    font-size: 100%;
}
</style>
<br>
<H2> Main Page </H2>
<br>
Welcome  <b> <?php echo $_SESSION['firstname']. " ".$_SESSION['lastname']."."; ?>  </b>
<br><br>
 <a href="logout.php">Logout</a> 
</body>
</html> 

logout.php

<?php
session_start();
unset($_SESSION['username']);
session_destroy();

header("Location: login.php");
exit;
?>

users.sql

-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2016 at 11:42 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `login`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(200) NOT NULL,
  `password` varchar(200) NOT NULL,
  `lastname` varchar(200) NOT NULL,
  `firstname` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `lastname`, `firstname`) VALUES
(1, 'jake', 'jake', 'POMPERADA', 'JAKE'),
(2, '123', '123', 'POMPERADA', 'JACOB SAMUEL'),
(3, 'iya', 'iya', 'POMPERADA', 'JULIANNA RAE'),
(4, 'allie', 'allie', 'POMPERADA', 'MA. JUNALLIE'),
(5, 'bill', 'bill', 'GATES', 'WILLIAM'),
(6, 'peter', 'peter', 'NORTON', 'PETER');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;








Login in Microsoft Visual Foxpro

Fibonacci Numbers in PHP

Fibonacci Numbers in PHP

 In this article I would like to share with you guys how to create fibonacci numbers using PHP as my programming. The program will ask the user to give number and then it will generate the fibonacci number series.

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



Program Listing

<!-- index.php
     Author  : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
     Website : http://www.jakerpomperada.com
               http://www.jakerpomperada.blogspot.com
     Email   : jakerpomperada@gmail.com
     Address : Bacolod City, Negros Occidental, Philippines
-->

<html>
<style>
  body {
    font-size: 20;
    font-family:sans-serif;
    font-weight: bold;
  }
input {
    font-size: 20px;
    font-weight: bold;
   }

  /* http://cssdemos.tupence.co.uk/button-styling.htm */ 
  input#shiny {
padding: 4px 20px;
/*give the background a gradient*/
background:#ffae00; /*fallback for browsers that don't support gradients*/
background: -webkit-linear-gradient(top, blue,blue);
background: -moz-linear-gradient(top, blue, blue);
background: -o-linear-gradient(top, blue, blue);
background: linear-gradient(top, blue, blue);
border:2px outset #dad9d8;
/*style the text*/
font-family:Andika, Arial, sans-serif; /*Andkia is available at http://www.google.com/webfonts/specimen/Andika*/
font-size:1.1em;
letter-spacing:0.05em;
text-transform:uppercase;
color:#fff;
text-shadow: 0px 1px 10px #000;
/*add to small curve to the corners of the button*/
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
/*give the button a drop shadow*/
-webkit-box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
-moz-box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
}
/****NOW STYLE THE BUTTON'S HOVER STATE***/
input#shiny:hover, input#shiny:focus {
border:2px solid #dad9d8;
}
 </style>
<body>
  <?php
  $values = $_POST['inputText'];


  if(isset($_POST['ClearButton'])){
  $values = "";

  }

   ?>
  <br>
  <h4> Fibonacci Numbers in PHP </h4>
  <form action="" method="post">
  Give a Number
  <input type="text" name="inputText" size="5" maxlength="5"
  value="<?php echo $values; ?>"  style="width:100px; height:30px;" required autofocus=""/>
  <br><br>
  <input id="shiny" type="submit" value="Ok" name="SubmitButton"/>
  &nbsp;&nbsp;&nbsp;
  <input id="shiny" type="submit" value="Clear" name="ClearButton"/>
</form>
<?php

// Function to generate the fibonacci series
function DiplayFibonacciSeries($n)
 {
 
  $first = 0;
  $second = 1;
 
  echo "<h4>Fibonacci Series</h4>";
  echo $first.' '.$second.' ';
 
  for($i = 2; $i < $n; $i++){
 
    $third = $first + $second;
 
    echo $third.' ';
 
    $first = $second;
    $second = $third;
 
    }
}

$values = $_POST['inputText'];

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

  $n= (int)$values;
  DiplayFibonacciSeries($n);
 }

?>

</body>
</html>

Friday, October 2, 2020

Fibonacci Sequence in VB6

  A simple fibonacci sequence in vb.net that I wrote that will ask the user to give an integer value and then it will generate the fibonacci sequence in the listview in Visual Basic 6.

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


Dim a As Integer
Dim b As Integer
Dim fib As Integer

Private Sub Command1_Click()
        a = 0
        b = 1
        Dim userinput, i As Integer
        userinput = Val(Text1.Text)
        i = userinput
        List1.AddItem (1)
        Do
            fib = a + b
            a = b
            b = fib
            List1.AddItem (fib)
            i = i + 1
        Loop While fib < i
End Sub

Private Sub Command2_Click()
Text1.Text = ""
List1.Clear
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub

Fibonacci Numbers in VB NET

Fibonacci Sequence in VB.NET

 A simple fibonacci sequence in vb.net that I wrote that will ask the user to give an integer value and then it will generate the fibonacci sequence in the listview in Visual Basic 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 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

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a As Integer = 0
        Dim b As Integer = 1
        Dim fib As Integer
        Dim userinput, i As Integer
        userinput = Val(TextBox1.Text)
        i = userinput
        ListView1.Items.Add(1)
        Do
            fib = a + b
            a = b
            b = fib
            ListView1.Items.Add(fib)
            i = i + 1
        Loop While fib < i
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        ListView1.Clear()
        TextBox1.Focus()
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        End
    End Sub
End Class


Fibonacci Series in C

Fibonacci Series in C

 Write a program that will ask the user to give an integer and then the program will generate the Fibonacci series using C as my 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

// fibonacci.c
// Author   : Jake Rodriguez Pomperada,MAED-IT,MIT
// Date     : October 2, 2020   Friday  2:52 PM
// Website  : http://www.jakerpomperada.blogspot.com
//            http://www.jakerpomperada.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental

#include <stdio.h>


int fibonacci_series(int n) {
   if (n <= 1)
   return n;
   return fibonacci_series(n-1) + fibonacci_series(n-2);
}

int main() {
   int n=0,a=0;
   
   printf("\n\n");
   printf("\tFibonacci Series in C");
   printf("\n\n");
   printf("\tGive a Number : ");
   scanf("%d",&n);
   printf("\n");
   printf("\tDisplay Results");
   printf("\n\n");
   printf("\t");
   for(a=0;a<n;a++) {
    printf(" %d ",fibonacci_series(a));
   }
   printf("\n\n");
   printf("\tEnd of Program");
   printf("\n");
}

Fibonacci Series in C++

Fibonacci Series in C++

Write a program that will ask the user to give an integer and then the program will generate the Fibonacci series using C++ as my 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

// fibonacci.cpp
// Author   : Jake Rodriguez Pomperada,MAED-IT,MIT
// Date     : October 2, 2020   Friday  1:09 PM
// Website  : http://www.jakerpomperada.blogspot.com
//            http://www.jakerpomperada.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental

#include<iostream>

using namespace std;

int fibonacci_series(int n) {
   if (n <= 1)
   return n;
   return fibonacci_series(n-1) + fibonacci_series(n-2);
}

int main() {
   int n=0;
   
   cout << "\n\n";
   cout << "\tFibonacci Series in C++";
   cout << "\n\n";
   cout <<"\tGive a Number : ";
   cin >> n;
   cout << "\n";
   cout << "\tDisplay Results";
   cout << "\n\n";
   cout << "\t";
   for(int a=0;a<n;a++) {
    cout<<fibonacci_series(a)<<" ";
   }
   cout << "\n\n";
   cout << "\tEnd of Program";
   cout << "\n";
}

Thursday, October 1, 2020

Sum, Product, and Divide in Visual Basic 6

Sum, Product, and Divide in Visual Basic 6

  I will show you how to write a program using Visual Basic 6 application that will ask the user

to give two integer values and then the program will compute the sum, product, and divide values of the two numbers 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.


Program Listing


Private Sub Command1_Click()

a = Val(Text1.Text)

b = Val(Text2.Text)


Text3.Text = (a + b)

Text4.Text = (a * b)

Text5.Text = (a / b)

End Sub


Private Sub Command2_Click()

End

End Sub


Wednesday, September 30, 2020

LLE PART1

PHYSICAL EXAMPLES OF FIRST ORDER SYSTEMS

Celsius To Fahrenhiet in Java

Celsius To Fahrenheit in Java

Write a program using Java programming language to convert temperature from Celsius to Fahrenheit degree.

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

 * September 30, 2020  Wednesday

 */



import java.util.Scanner;

import java.math.RoundingMode;

import java.text.DecimalFormat;


public class Celsius_Fahrenheit {

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\tCelsius To Fahrenheit in Java");

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


      System.out.print("\tTemperature in Celsius : ");

          double celsius = input.nextDouble();


        /* Convert Celsius to Fahrenheit */

         double Fahrenheit = celsius * (9f / 5) + 32;

        

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

        System.out.println("\tThe " + celsius + " Degree Celsius is equal to "

        + df2.format(Fahrenheit) + " in Fahrenheit.");

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

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

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



}


}


Fahrenheit To Celsius in Java

Fahrenheit To Celsius in Java

 I will show you how to write a program using the Java programming language to convert temperature from Fahrenheit to Celsius degree.

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
 * September 30, 2020  Wednesday
 */



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


public class Fahrenheit_Celsius {
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\tFahrenheit To Celsius in Java");
    System.out.println("\n");

      System.out.print("\tTemperature in Fahrenheit: ");
        double fahrenheit = input.nextDouble();

        double  celsius =(( 5 *(fahrenheit - 32.0)) / 9.0);
        
        System.out.println("\n");
        System.out.println("\tThe " + fahrenheit + " Degree Fahrenheit is equal to "
        + df2.format(celsius) + " in Celsius");
         System.out.print("\n\n");
System.out.println("\tEnd of Program");
        System.out.println("\n\n");
}

}


Fibonacci Series in Java

Fibonacci Series in Bash

Tuesday, September 29, 2020

Fibonacci Numbers in Java

Write a program  that will ask the user to give a number and then program will generate the fibonacci sequence.  The number is said to be in a Fibonacci series if each subsequent number is the sum of the previous two numbers 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.

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

package Fibonacci;

import java.util.Scanner;

/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * jakerpomperada@gmail.com
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * September 25, 2020  Friday
 */

public class Fibonacci_Numbers {

public static void main(String[] args) {
// TODO Auto-generated method stub
    int n, a = 0, b = 0, c = 1;
    
        Scanner input = new Scanner(System.in);
        
        System.out.println("\n");
    System.out.print("\t\tFibonacci Numbers in Java");
    System.out.println("\n");
        System.out.print("\tEnter a Number : ");
        n = input.nextInt();
        System.out.println("\n");
        System.out.print("\tThe Fibonacci Series :");
        for(int i = 1; i <= n; i++)
        {
            a = b;
            b = c;
            c = a + b;
            System.out.print(a+" ");
        }
        
    System.out.print("\n\n");
System.out.println("\tEnd of Program");
        System.out.println("\n\n");

}

}


Division of Two Numbers in Java

Division of Two Numbers in Java

 In this article, I will show you how write a Java program to divide two numbers and print 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

/* Divide_Two.java
 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT
 * September 29, 2020
 * www.jakerpomperada.blogspot.com
 * www.jakerpomperada.com
 * jakerpomperada@gmail.com
 * Bacolod City, Negros Occidental
 */

import java.util.Scanner;

public class Divide_Two {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
        
        System.out.println("\n");
        System.out.print("\tDivide of Two Integers in Java");
        System.out.println("\n");
        System.out.print("\tGive First Value  : ");
        int firstInt = in.nextInt();
        System.out.print("\tGive Second Value : ");
        int secondInt = in.nextInt();

        System.out.println();
        System.out.printf("\tThe divide of two integers is %d%n"
        , firstInt / secondInt,".");
        System.out.println();
        System.out.println("\tEnd of Program");
        System.out.println("\n");

}

}

Sunday, September 27, 2020

Difference Between Two Integers in Java

Difference of Two Integers in Java

 In this article I will show you how write a program that asking the user to give two integer numbers and then the program will compute the difference of the two integer 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.

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

/* difference.java
 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT
 * September 27, 2020
 * www.jakerpomperada.blogspot.com
 * www.jakerpomperada.com
 * jakerpomperada@gmail.com
 * Bacolod City, Negros Occidental
 */

import java.util.Scanner;

public class difference {

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        
        System.out.println("\n");
        System.out.print("\tDifference of Two Integers in Java");
        System.out.println("\n");
        System.out.print("\tGive First Value  : ");
        int firstInt = in.nextInt();
        System.out.print("\tGive Second Value : ");
        int secondInt = in.nextInt();

        System.out.println("\n");
        System.out.printf("\tDifference of two integers: %d%n", firstInt - secondInt);
        System.out.println();
        System.out.println("\tEnd of Program");
        System.out.println("\n");
    }
}