Saturday, January 7, 2023

Sorting of Strings Using Selection Sort in Java

A program that will sort an array of strings using selection sort algorithm in 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing


class Main

{


// Selection Sort to Sort the given array of Strings


static void selectionSort(String arr_items[],int n)

{

   

    for(int i = 0; i < n - 1; i++)

    {

     

       

        int min_index = i;

        String minStr = arr_items[i];

        for(int j = i + 1; j < n; j++)

        {

             

            if(arr_items[j].compareTo(minStr) < 0)

            {

                

                minStr = arr_items[j];

                min_index = j;

            }

        }

 

   

    if(min_index != i)

    {

        String temp = arr_items[min_index];

        arr_items[min_index] = arr_items[i];

        arr_items[i] = temp;

    }

    }

}

 


public static void main(String args[])

{

    String arr[] = {"Zebra","Dog","Cobra","Lion","Bear","Tiger","Rabbit","Cat","Buffalo"};

    

    int n = arr.length;

    

        

    System.out.println();

    System.out.println("\tSorting of Strings Using Selection Sort in Java\n");

    System.out.println();

          

    // Printing the array before sorting

    for(int i = 0; i < n; i++)

    {

        System.out.println(i+": "+arr[i]);

    }

    

    System.out.println();

 

    selectionSort(arr, n);

 

    System.out.println("After Sorting of Strings\n");

     

    // Printing the array after sorting

    for(int i = 0; i < n; i++)

    {

        System.out.println(i+": "+arr[i]);

    }

}

}

Thursday, January 5, 2023

Inches To Feet in Java

Inches To Feet in Java

 A program that will ask the user to give length in inches and then the program will convert the given inches into feet equivalent in 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

import java.util.*;


public class Main

{

    

 static Scanner console=new Scanner(System.in);

public static void main(String[] args) {

        double inches;

        double result;


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

        System.out.print("\tGive Inches Value : ");

        inches=console.nextDouble();

        result=inches/12;

    

        System.out.println();    

        System.out.println("\t" + inches + " Inche(s) is equal to " + result + " Feet(s).");

}

}


Wednesday, January 4, 2023

US Dollar To Philippine Peso Using Method in Java

US Dollar To Philippine Peso Using a Method in Java

 A program to convert the given US Dollar value into Philippine Peso Using a Method in 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ public class Main { public static double US_Dollar_PHP_Peso(double us_dollar) { return(us_dollar * 58.98); } public static void main(String[] args) { double convert_ph=0.00; double us_dollar = 100.45; convert_ph = US_Dollar_PHP_Peso(us_dollar); System.out.println("\n\n\t$"+ us_dollar + " is equivalent to PHP " + String.format("%.2f",convert_ph)); } }

Tuesday, January 3, 2023

Two Decimal Places in JavaScript

Two Decimal Places in JavaScript

 A simple program to show how to declare two decimal places in JavaScript 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing


<!DOCTYPE html>

<html>

<title>Two Decimal Places in JavaScript</title>

<head>

<script>


val_given = 5623.6789;


result = val_given.toFixed(2);


document.write("Given Value : " +result);

</script>

</head>

<body>

</body>

</html>

US Dollar To Philippine Peso Using a Function in JavaScript

US Dollar To Philippine Peso Using a Function in JavaScript

 A simple program to convert the given US Dollar To Philippine Peso Using a Function in JavaScript 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing

<!DOCTYPE html>

<html>

<title>Online Javascript Editor</title>

<head>

<script>


function US_Dollar_PHP_Peso(US_Dollar) {

  return(US_Dollar * 55.73);

  }


result = US_Dollar_PHP_Peso(100.34).toFixed(2);


document.write(" PHP " +result);

</script>

</head>

<body>

</body>

</html>


Monday, January 2, 2023

Subtract Two Numbers Using A Function in PHP

Subtract Two Numbers Using a Function in PHP

 A simple program to show how to subtract two numbers using a function 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing

<?php

function subtract($a,$b) {

  $diff = ($a-$b);

  return($diff);

}


$c=12;

$d=8;


$result = subtract($c,$d);


echo "The difference between $c and $d is $result.";



Sunday, January 1, 2023

Masters of Science in Information Technology O Masters of Information Te...

Divide Two Numbers Using A Function in Python

Divide Two Numbers Using A Function in Python

  A simple program to ask the user to give two numbers and then the program will compute the quotient of two numbers using a function in Python 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing


def  divide_all(a,b):#function for division

    divide = a/b;

    return divide; #return value


num_1 = int(input("Enter the first number  : "))

num_2 = int(input("Enter the second number : "))


result = divide_all(num_1,num_2)


print("\nThe quotient of {} and {} is {}".format(num_1, num_2,result))


Addition of Two Numbers Using a Function in Python

Addition of Two Numbers Using a Function in Python

 A simple program to ask the user to give two numbers and then the program will compute the sum of two numbers using a function in Python 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.

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

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


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

def add_num(a,b):#function for addition

    sum=a+b;

    return sum; #return value


num_1 = int(input("Enter the first number  : "))

num_2 = int(input("Enter the second number : "))


total_sum = add_num(num_1,num_2)


print("\nThe sum of {} and {} is {}".format(num_1, num_2,total_sum))


Multiply Two Numbers Using a Function in JavaScript

Ternary Operator in JavaScript