Wednesday, May 25, 2022

Horizontal Tab in C++

Horizontal Tab in C++

 A simple program to demonstrate how to declare and use horizontal tab 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

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


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

#include <iostream>

using namespace std;

int main()
{
cout <<"\tThis is my C++ program\n";
cout <<"\t\tBacolod City\n";
cout <<"\t\t\tC++ is fun to learn";
}

Bigger Between Two Numbers in C++

Bigger Between Two Numbers in C++

 A program that will check and determine which of the two given numbers by the user has a bigger numerical value or they have the same numerical value 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

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


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

#include <iostream>  

/* Bigger Between Two Numbers in C++ */

using namespace std;
   
int main() {  
    int a=0, b=0;  
    cout <<"\n";
    cout <<"\tBigger Between Two Numbers in C++";
    cout <<"\n\n";
    cout <<"\tGive Two Integer Numbers : ";  
    cin >> a >> b;
    cout <<"\n\n";
    
if(a > b) 
    {
        cout <<"\t" << a << " is the largest number.\n";
     
    } 
    else if (b > a)
    { 
       cout <<"\t" << b << " is the largest number.\n";
    } 
    else 
    {
cout <<"\tBoth are Equal Numbers. \n";
    }
    cout <<"\n";
    cout <<"\tEnd of Program";
    cout <<"\n\n";
    return 0;  
}


Tuesday, May 24, 2022

Positive and Negative Number Checker in Visual Basic 6

Positive and Negative Number Checker in Visual Basic 6

 A simple program that I wrote using Visual Basic 6 asks the user to give a number and then the program will check if the given number is a positive or negative number.

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

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


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

Private Sub Command1_Click()
' Written By Jake Rodriguez Pomperada, MAED-IT, MIT
' www.jakerpomperada.com  and www.jakerpomperada.blogspot.com
' jakerpomperada@gmail.com

Dim a As Integer

a = Val(Text1.Text)

If (Text1.Text = "") Then
MsgBox "Cannot Be Empty. Try Again", vbInformation, "Result"
Text1.SetFocus
ElseIf (a < 0) Then
MsgBox "The given number " & a & " is a Negative Number", vbInformation, "Result"
Text1.SetFocus
Else
MsgBox "The given number " & a & " is a Positive Number", vbInformation, "Result"
Text1.SetFocus
End If
End Sub

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

Private Sub Command3_Click()
End
End Sub



Monday, May 23, 2022

Decimal To Hexadecimal in PHP

Decimal To Hexadecimal in PHP

 A simple program to ask the user to give a decimal value and then convert it into hexadecimal equivalent using 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 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

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


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

index.htm

<?php

    $output = "";

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

        $output = '<div class="output">Hexadecimal Value = '.

                         dechex($_POST["txtNumber"]).

                  '</div>';

    }

?>

<!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>Decimal To Hexadecimal In PHP</title>

    <style>

        * {

            box-sizing: border-box;

            margin: 0;

            padding: 0;

        }

        body {

            background-color: #eee;

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            font-family: sans-serif;

        }

        form {

            background: #fff;

            padding: 30px;

            border-radius: 10px;

        }

        h2 {

            margin-bottom: 20px;

        }

        label,

        input,

        button {

            display: block;

            width: 100%;

            font-size: 14px;

        }

        label {

            padding: 5px 0;

        }

        input {

            padding: 5px;

            margin-bottom: 5px;

        }

        button {

            padding: 8px 0;

            background-color: #03a9f4;

            border: none;

            border-radius: 3px;

            color: #fefefe;

            cursor: pointer;

        }

        .output {

            margin-top: 10px;

            background-color: #607d8b;

            padding: 12px 0;

            color: #fefefe;

            text-align: center;

        }

    </style>

</head>

<body>

    <form action="" method="post">

        <h1>Decimal To Hexadecimal In PHP</h1>

        <h2>Jake R. Pomperada, MAED-IT, MIT</h2>

        <label for="txtNumber">Enter a number to convert:</label>

        <input type="number" name="txtNumber" id="txtNumber" value="<?= isset($_POST["txtNumber"])?$_POST["txtNumber"]:""; ?>" autofocus>

        <button type="submit">Convert To Hexadecimal</button>

        <?= $output; ?>

    </form>

</body>

</html>


Sunday, May 22, 2022

Coin Flips Simulation in C++

Coin Flips Simulation in C++

 A simple coin flips simulation 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

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


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

#include <iostream>
#include <random>
#include <chrono>

using namespace std;

int main()
{
   std::default_random_engine generator;
   std::uniform_int_distribution<int> distribution(0,1);
   generator.seed(time(0));
   int flips{};
   cout <<"\n\n";
   cout << "\tCoin Flips Simulation in C++";
   cout <<"\n\n";
    cout << "\tHow many flips : ";
   cin >> flips;
   //you should not time the cin statement, as that introduces user
//response time in result.
  cout <<"\n\n";
   auto start = chrono::steady_clock::now();
   int heads{};
   for(int i{}; i<flips; i++)
       {
         heads += distribution(generator);
       }
    cout << "\theads: " << heads << " tails: " << flips-heads << endl;
    auto end = chrono::steady_clock::now();
    cout <<"\n\n";
    cout << "\tElapsed time: "
         << chrono::duration_cast<chrono::milliseconds>(end - start).count()
         << "ms\n";
   cout <<"\n\n";
   cout << "\tEnd of Program";
   cout <<"\n\n";
}


Saturday, May 21, 2022

Sum, Average, Minimum and Maximum Values in C#

Sum, Average, Minimum and Maximum Values in C#

 A simple program to solve the sum, average, minimum and maximum values 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

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


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

using System;
using System.Linq;

class Max_Min
{
  static void Main(string[] args)
  {
    double[] numbers = { 1.2, 9.3, 1.6, 2.5 };

    DisplayArray(numbers);
    Sum_Average(numbers);
    Max_Value(numbers);
    Min_Value(numbers);

    Console.ReadKey();
  }

  private static void Min_Value(double[] numbers)
  {
    double min = numbers.Min();

    Console.WriteLine("Min is " + min);

  }

  private static void Max_Value(double[] numbers)
  {
    double max = numbers.Max();
    Console.WriteLine("Max is " + max);
  }

  private static void Sum_Average(double[] numbers)
  {
    double sum = numbers.Sum();
    double avg = numbers.Average();
    
    Console.WriteLine("Total is " + sum);
    Console.WriteLine("Average is " + avg);
  }

  private static void DisplayArray(double[] numbers)
  {
    Console.WriteLine("These are the elements in the array:");
    Console.Write("| ");
    foreach(double num in numbers)
      Console.Write(num + " | ");

    Console.WriteLine("\n");
  }
}

Friday, May 20, 2022

Decimal To Octal in PHP

Decimal To Octal in PHP

 A program that will ask the user to give a decimal number and then it will convert into octal equivalent using 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 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

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


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

index.htm

<?php
    $output = "";
    if (isset($_POST["txtNumber"])) {
        $output = '<div class="output">Octal Value = '.
                        decoct($_POST["txtNumber"]).
                  '</div>';
    }
?>
<!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>Decimal To Octal In PHP</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #eee;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: sans-serif;
        }
        form {
            background: #fff;
            padding: 30px;
            border-radius: 10px;
        }
        h2 {
            margin-bottom: 20px;
        }
        label,
        input,
        button {
            display: block;
            width: 100%;
            font-size: 14px;
        }
        label {
            padding: 5px 0;
        }
        input {
            padding: 5px;
            margin-bottom: 5px;
        }
        button {
            padding: 8px 0;
            background-color: #03a9f4;
            border: none;
            border-radius: 3px;
            color: #fefefe;
            cursor: pointer;
        }
        .output {
            margin-top: 10px;
            background-color: #607d8b;
            padding: 12px 0;
            color: #fefefe;
            text-align: center;
        }
    </style>
</head>
<body>
    <form action="" method="post">
        <h1>Decimal To Octal In PHP</h1>
        <h2>Jake R. Pomperada, MAED-IT, MIT</h2>
        <label for="txtNumber">Enter a number to convert:</label>
        <input type="number" name="txtNumber" id="txtNumber" value="<?= isset($_POST["txtNumber"])?$_POST["txtNumber"]:""; ?>" autofocus>
        <button type="submit">Convert To Octal</button>
        <?= $output; ?>
    </form>
</body>
</html>

Odd and Even Numbers Using ng-init in AngularJS

Odd and Even Numbers Using ng-init in AngularJS

 Machine Problem

Write a program that uses ng-init directive that will check if the given number is an even or odd, 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

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


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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 29, 2021 Thursday  10:00 AM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head> 
<title>Odd and Even Numbers Using ng-init in AngularJS</title>
</head>
<style>
body {
   font-family: "arial";
   font-style: bold;
   font-size: 18px;
  }
 </style>
<script type="text/javascript" src="angular.min.js"></script>
<body><br>
<h3>Odd and Even Number Using ng-init in AngularJS</h3>
<body>
  <script>
      
   angular.module('app', []).filter('Check_Number', function() {
       return function(given_number) {
    if (given_number % 2 === 0)
          {
        display = "The given number " + given_number +
                " is an Even Number.";
          }
      else
          {
       display = "The given number " + given_number +
                " is an Odd Number.";
         }
        return(display);
    };
  });
               
      
    </script>
<div ng-app="app" ng-model="given_number" ng-init="given_number=13">
 <p> {{ given_number | Check_Number}}</p>
    </div>
</body>
</html>

Thursday, May 19, 2022

User Defined Method and Arrays in Java

User Defined Methods and Arrays in Java

 A Java program to demonstrate how to declare and use user-defined methods and arrays.







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

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


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


Max_Min.java


public class Max_Min {


public static void main(String[] args) {

// TODO Auto-generated method stub

double[] myList = {1.2, 9.3, 1.6, 2.5}; // Declare the array; assign values into array


    // Call the dispArray user-defined method to display the array contents to screen.

    dispArray(myList);

        

    Sum_Average(myList);

    Max_Value(myList);

            Min_Value(myList);

 

  }


  public static void dispArray(double[] myList) {


    // Print all the array elements

    System.out.println("These are the elements in the array:");

    System.out.print("|");

    for (int i = 0; i < myList.length; i++) {

      System.out.print(myList[i] + "|");

    }

    System.out.println();


  }

  

  

  private static void Sum_Average(double[] myList) {

  // Summing and averaging all elements

    double sum = 0;


    for (int i = 0; i < myList.length; i++) {

      sum += myList[i];

    }

    System.out.println();

    System.out.println("Total is " + sum);

    System.out.println("Average is " + (sum / myList.length));


    }


  

  private static void Max_Value(double[] myList) {

  // Finding the largest element

    double max = myList[0];

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

      if (myList[i] > max) max = myList[i];

    }


    System.out.println("Max is " + max);

    }

  

  private static void Min_Value(double[] myList) {

   // Finding the smallest element

    double min = myList[0];

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

      if (myList[i] < min) min = myList[i];

    }


    System.out.println("Min is " + min);


  }

} // End of Code