Wednesday, February 23, 2022

Sorting Person's Name in C

 A program that will ask the user to give six names of the person and ask the user to sort the names by ascending or descending order using a 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.

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

Thank you very much for your support.





Program Listing

#include <stdio.h>
#include <conio.h>
#include  <string.h>


 main()
{
char name[6][100],temp[100];
int a1,i,j,select=0,c=1;

printf("\n");
printf("\tSorting Person's Name in C");
printf("\n");
printf("\nGive Six Names : ");
printf("\n");
for(a1=0;a1<=5;a1++)
{
printf("%d. ",c);
gets(name[a1]);
c++;
}

printf("\n");
printf("\t[1] Sort in Ascending Order   [2] Sort in Descending Order : ");
scanf("%d",&select);
printf("\n");

if (select==1)
 {


  for(i=0;i<6;i++)
  {
   for(j=i+1;j<6;j++)
    {
    if(strcmp(name[i],name[j])>0)
    {
     strcpy(temp,name[i]);
     strcpy(name[i],name[j]);
     strcpy(name[j],temp);
    }
   }
  }
printf("\n");
       printf("\tSorting Names in Ascending Order");
c=1;
for(i=0;i<5;i++)
{

printf("\n%d. %s",c,name[i]);
c++;
}
}
else if(select==2)
{

  for(i=0;i<5;i++)
  {
   for(j=i+1;j<6;j++)
    {
    if(strcmp(name[i],name[j])<0)
    {
     strcpy(temp,name[i]);
     strcpy(name[i],name[j]);
     strcpy(name[j],temp);
    }
   }
  }
printf("\n");
       printf("\tSorting Name's 'Descending Order");
c=1;
for(i=0;i<5;i++)
{

printf("\n%d. %s",c,name[i]);
c++;
}

}
else if(select<=0|| select>=3)
{
printf("\n\Cannot sort Invalid Key!");

}
printf("\n");
printf("\tEnd of Program");
printf("\n");

}

Tuesday, February 22, 2022

Sum,Average, and Product of Three Numbers in Java

Sum,Average, and Product of Three Numbers in Java

 A program that will ask three numbers and then it will compute the sum, average and product of three given 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.

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

Thank you very much for your support.





Program Listing

import java.util.Scanner;


public class LoopSample {


public static void main(String args[]) {



Scanner input = new Scanner(System.in);

double num1=0.00, num2=0.00, num3=0.00;

double sum=0.00, average=0.00, product=0.00;

char c,ch;

     

do 

{

System.out.println();

System.out.println("\tSum,Average, and Product of Three Numbers in Java");

System.out.println();

System.out.print("Enter First Number: ");

num1 = input.nextInt();


System.out.print("Enter Second Number: ");

num2 = input.nextInt();


System.out.print("Enter Third Number: ");

num3 = input.nextInt();


System.out.println();

sum = num1 + num2 + num3;

System.out.println("Sum of these numbers:"+sum);



average = sum / 3;

System.out.println("Average of these number:"+average);



product = num1 * num2 * num3;

System.out.println("Product of these numbers: "+product);


System.out.println();

System.out.print("Do you want to continue? Y/N : ");

c = input.next().charAt(0);        


ch = Character.toUpperCase(c);  

}while (ch == 'Y');  


System.out.println();

System.out.println("Thank you for using this software.");

System.out.println();

input.close();

}




}


Gallons To Liters in Modern C++

Gallons To Liters in Modern C++

 A program that will ask the user to give value in gallons and it will convert to liters using modern C++ programming approach.

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.

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

Thank you very much for your support.





Program Listing

// Jake Rodriguez Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com


#include <iostream>


int main()

{

   int no_gallons=0, no_liters=0;


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

   std::cout << "\tGallons To Liters in Modern C++";

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

   std::cout << "\tHow Many Gallons? : ";

   std::cin >> no_gallons; 


   no_liters = (no_gallons * 4); 

   

   std::cout <<"\n";

   std::cout <<"\t" << no_gallons << " Gallons is equivalent to "

       << no_liters << " Liters.";

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

   std::cout << "\tEnd of Program";

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

  return 0;

}

Sunday, February 20, 2022

Basic Math Operations Using Arrays in Java

Basic Math Operations Using Arrays in Java

 Machine Problem

Creating a Java Program will print the Sum (Addition), Difference (Subtraction), Product (Multiplication), Quotient (Division) of five 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.

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

Thank you very much for your support.




Program Listing


/* basic_math.java

 *  

 *  Jake Rodriguez Pomperada, MAED-IT, MIT

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

 *  jakerpomperada@gmail.com

 *  Bacolod City, Negros Occidental Philippines

 * 

 */


import java.util.Scanner;



public class basic_math {

 

public static void main(String[] args) {

    Scanner input_val= new Scanner(System.in);

int array[] = new int[5];

int a=0,b=0,c=0,d=0,e=0;

     int addition=0,subtraction=0,multiply=0, quotient=0;

        

   

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

  System.out.println("\tBasic Math Operations Using Arrays in Java");

  System.out.println();

      System.out.print("\tInput first number  : ");

      a = array[0]=input_val.nextInt();

      System.out.print("\tInput second number : ");

      b = array[1]=input_val.nextInt();

      System.out.print("\tInput third number  : ");

      c = array[2]=input_val.nextInt();

      System.out.print("\tInput fourth number : ");

      d = array[3]=input_val.nextInt();

      System.out.print("\tInput fifth number  : ");

      e = array[4]=input_val.nextInt();

     

      addition = (a+b+c+d+e);

      subtraction = (a-b-c-d-e);

      multiply = (a*b*c*d*e);

      quotient = (a/b/c/d/e);

      

      System.out.println();

      System.out.println("\tThe sum of " + a + " numbers " + addition);

      System.out.println("\tThe difference of " + a + " numbers " + subtraction);

      System.out.println("\tThe product of " + a + " numbers " + multiply);

      System.out.println("\tThe quotient of " + a + " numbers " + quotient);

      

      

      input_val.close();

}


}



Checking For Same Numerical Values in Java

Checking For Same Numerical Values in Java

 Machine Problem 

Create a Java program that will identify if the inputted numbers are the same 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.

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

Thank you very much for your support.






Program Listing

/* Same_values.java

 *  

 *  Jake Rodriguez Pomperada, MAED-IT, MIT

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

 *  jakerpomperada@gmail.com

 *  Bacolod City, Negros Occidental Philippines

 * 

 */


import java.util.Scanner;



public class Same_Values {


    public static boolean isAllEqual(int[] a){

        for(int i=1; i<a.length; i++){

            if(a[0] != a[i]){

                return false;

            }

        }


        return true;

    }


public static void main(String[] args) {

int array[] = new int[5];

int a=0,b=0,c=0,d=0,e=0;

        Scanner input_val= new Scanner(System.in);

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

  System.out.println("\tChecking For Same Numerical Values in Java");

  System.out.println();

      System.out.print("\tInput first number  : ");

      a = array[0]=input_val.nextInt();

      System.out.print("\tInput second number : ");

      b = array[1]=input_val.nextInt();

      System.out.print("\tInput third number  : ");

      c = array[2]=input_val.nextInt();

      System.out.print("\tInput fourth number : ");

      d = array[3]=input_val.nextInt();

      System.out.print("\tInput fifth number : ");

      e = array[4]=input_val.nextInt();

      System.out.println("\t"+ isAllEqual(new int[] {a,b,c,d,e})); 

      input_val.close();

}


}


Paano Ba Maka Gain Experience Sa Computer Programming

Bitwise Operators in C

Bitwise Operators in C

 A simple program to demonstrate how to declare and use bitwise operators 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.

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

Thank you very much for your support.





Program Listing

/* bitwise.c

   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT

   Date     : November 19, 2018  Monday 2:38 PM

   Location : Bacolod City, Negros Occidental

   Website  : http://www.jakerpomperada.com

   Emails   : jakerpomperada@jakerpomperada.com

              jakerpomperada@gmail.com

              jakerpomperada@yahoo.com

              jakerpomperada@aol.com

*/


#include <stdio.h>


int main() 

 int x=0, y=0; 

 printf("\n\n");

 printf("\tBitwise Operators in C");

 printf("\n\n");

 printf("\tGive two integers: ");

 scanf("%d%d",&x,&y);

 printf("\n\n");

 printf("\t%d & %d =  %d\n",x,y,(x & y)); 

 printf("\t%d | %d = %d\n",x,y,(x | y)); 

 printf("\t%d ^ %d = %d\n",x,y,(x ^ y));

 printf("\t~%d = %d\n",x,~x); 

 printf("\t%d << %d = %d\n",x,2,(x << 2));

 printf("\t%d >> %d = %d\n",x,2,(x >> 2));

 printf("\n\n");

 printf("\tEnd of Program");

 printf("\n\n");

}


Saturday, February 19, 2022

Indefinite Loop in C++

Indefinite Loop in C++

 Here is a good example of how to declare and use an indefinite loop 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 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.

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

Thank you very much for your support.




Program Listing

#include <iostream> using namespace std; int main() { int i=0; for (;i=1;) { cout << "Indefinite Loop in C++ " << endl; } }

Friday, February 18, 2022

US Dollar To Philippine Peso Vice Versa in C++

US Dollar To Philippine Peso Vice Versa in C++

A simple program to convert the philippine peso to us dollar currency vice versa using a 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.

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

Thank you very much for your support.




Program Listing


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

// February 18, 2022


#include <iostream>


class CurrencyConverter

{

public:

     explicit CurrencyConverter(float rate) : exchangeRate(rate)

     {

   }

   float convertDollarToPeso(float amount)

   {

         return amount * exchangeRate;

     }

   float convertPesoToDollar(float amount)

   {

     return amount / exchangeRate;

     }

private:

     float exchangeRate;

};


int main()

{

     int choice;

     float pesoValue, amount, result = 0.00;


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

     std::cout << "US Dollar To Philippine Peso Vice Versa in C++\n\n";

     std::cout << "USD 1 is equivalent to Php ";

     std::cin >> pesoValue;


     std::cout << "\nPress 1 for PESO to DOLLAR conversion\nPress 2 for DOLLAR to PESO conversion\n";


     while(1)

     {

         std::cout << "\nChoice: ";

         std::cin >> choice;

         std::cin.ignore(255, '\n');


         if(choice != 1 && choice != 2)

         {

             std::cerr << "Invalid choice\n";

             return 0;

         }


         std::cout << "Amount: ";

         std::cin >> amount;

         std::cin.ignore(255, '\n');


         CurrencyConverter cc(pesoValue);

         if( choice == 1)

         {

             result = cc.convertPesoToDollar(amount);

             std::cout << amount << " Peso" << " = " << result << " US Dollar\n";

         }

         else if (choice == 2)

         {

             result = cc.convertDollarToPeso(amount);

             std::cout << amount << " Dollar" << " = " << result << " Philippine Peso\n";

         }

     }

}


Thursday, February 17, 2022

Nested For Loop Statement in C

Nested For Loop Statement in C

 A simple program that will show how to declare and use nested for loop statements using a 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.

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

Thank you very much for your support.





Program Listing

#include <stdio.h>

int main()
{
     int i,j,k;
    printf("\t\t\tNested For Loop Statement in C\n\n");
    for(i = 0; i < 10; i++)
    {
        printf("\t\t\t\t");
        for(j = 0; j < 10; j++)
        printf("$ ");  
        printf("\n");
    }
     printf("\n");
    printf("\t\t\t\tEnd of Program\n");
    printf("\n");
    return 0;
}

Wednesday, February 16, 2022

Smallest and Biggest Numbers in Java

SMALLEST AND HIGHEST NUMBER IN JAVA

 Write a program in Java that will check what is the highest and  lowest number given by the user using one dimensional array.

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.

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

Thank you very much for your support.




Program Listing

// smallest_biggest_number.java

// Written By: Mr. Jake R. Pomperada, MAED-IT

// Date : July 7, 2015

// Email Address: jakerpomperada@yahoo.com

//                jakerpomperada@gmail.com


// Problem : Write a program in Java that will check what is the highest and

//           lowest number given by the user using one dimensional array.


import java.util.Scanner;  


public class smallest_highest {

    

    public static void main(String[] args) {


        Scanner input=new Scanner(System.in);

       

        int[] num= new int[10];

       

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

       System.out.print("\t\tSMALLEST AND HIGHEST NUMBER IN JAVA ");

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

       System.out.print("How many items ? : ");

       int n=input.nextInt();

       int smallest = Integer.MAX_VALUE;

       int biggest =Integer.MIN_VALUE;

      

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

            int y=i+1;

            System.out.print("Enter item value no. " + y  + " value : ");

            num[i]=input.nextInt();

            if(num[i] < smallest) {

 

             smallest = num[i];


            }

            if (num[i] > biggest) {

                biggest = num[i];

               }


        }

       System.out.println();

       System.out.println("The Smallest number is  " +smallest + ".");

       System.out.println("The Biggest number is   " +biggest +".");

       System.out.println();

       System.out.println("\t\t END OF PROGRAM");     

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

       input.close();

    }


}


Tuesday, February 15, 2022

Age Checker Using Arrays in C++

Age Checker Using Arrays in C++

 A simple program to check if the given age is already an adult or still a minor using 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.

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

Thank you very much for your support.





Program Listing


 #include <iostream>


 using namespace std;


  int ages(int a) {

      if (a >= 18) {

          cout << "You are an adult";

      }

      else

      {

      cout << "Still a Minor";

      }

  }


  main() {

      int age2[1];

      

      cout <<"\n\n";

      cout << "\tAge Checker Using Arrays in C++";

      cout <<"\n\n";

      cout << "Enter your age :";

      cin >> age2[0];

      cout << "\n\n";

      ages(age2[0]);

      cout << "\n\n";

      system("pause");

  }

Monday, February 14, 2022

Kilometers To Miles Using ng-bind in AngularJS

Kilometers To Miles Using ng-bind in AngularJS

 Machine Problem 

Write a program that uses ng-bind directive that will accept distance in kilometers from the user and then the the program will convert the given kilometer distance value into miles distance equivalent, 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.

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

Thank you very much for your support.





Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 29, 2021 Thursday  3:49 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head>

  <title>Kilometers To Miles Using ng-bind in AngularJS</title>

</head>

<style>

body {

  font-family: arial;

  font-size: 25px;

  font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>


<script>

       var app = angular.module("distance", []);

        app.controller('app', ['$scope', function ($app) {

         $app.convert = function () {

                $app.miles = ($app.kilometers * 0.621371192);

                $app.twoDecimal = $app.miles.toFixed(2);

                $app.display = $app.twoDecimal + " Mile(s).";

            }

        }]);

    </script> 

</script>  

<div ng-app="distance" ng-controller="app">

  <form>

  <table border="0" cellspacing=10>

  <tr>Kilometers To Miles Using ng-bind in AngularJS</tr>

  <tr>

  <td>Enter Kilometer(s) Value </td>

  <td><input type="number"  ng-model="kilometers" ng-change="convert()"></td>

  </tr>

</table>

  </form>

  <span>{{kilometers}} Kilometer(s) is equivalent to</span> 

    <span ng-bind="display"></span>

   </p> 

</div>

</body>

</html>