Friday, April 15, 2022

Prime Number Checker in JavaScript

 A program that will ask the user to give a number and then the program will check if the given number is a prime number or not using 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 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

<!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>Prime Number Checker in JavaScript</title>

    <style>

        * {

            box-sizing: border-box;

            margin: 0;

            padding: 0;

        }

        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background-color: #AAAF99;

            color: #000;

            font-family: sans-serif;

        }

        main {

            padding: 50px;

            border-radius: 10px;

            background-color: #fff;

            min-width: 500px;

        }

        h1 {

            margin-bottom: 5px;

            font-size: 28px;

            text-align: center;

        }

        h2 {

            margin-bottom: 30px;

            font-size: 20px;

            text-align: center;

        }

        .block {

            margin: 0 auto 12px;

            display: flex;

            align-items: center;


        }

        label {

            display: block;

            width: 35%;

            line-height: 40px;

            background-color: #2F4C58;

            color: #eee;

            text-align: center;

        }

        input {

            padding: 10px;

            width: 65%;

            font-size: 14px;

            border-radius: 0 5px 5px 0;

            border: 2px solid #000;

            outline: none;

        }

        .btnBlock {

            display: flex;

            width: 100%;

        }

        .btn {

            display: inline-block;

            padding: 15px;

            background-color: #63A583;

            color: #fff;

            outline: none; 

            border: none;

            cursor: pointer;

            width: 150px;

            width: 50%;

            font-size: 16px;

            text-decoration: none;

            text-align: center;

            transition: all .2s;

        }

        .btnReset {

            background-color: #6E93D6;

        }

        .btn:hover {

            opacity: 0.9;

        }

        .average {

            display: block;

            width: 100%;

            margin-top: 12px;

            padding: 20px 0;

            background-color: #2F4C58;

            font-size: 16px;

            text-align:center;

            color: #f3f3f3;

        }

        .hide {

            display: none;

        }

    </style>

</head>

<body>

    <main class="container">

        <h1>PRIME NUMBER CHECKER IN JAVASCRIPT</h1>

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

        <form action="" id="frmCalc">

            <div class="block">

                <label for="val_num">Give A Number</label>

                <input type="number" min="1" max="100" id="val_num" autofocus required>

            </div>

           

            <div class="btnBlock">

                <button type="submit" class="btn">SUBMIT</button>

                <a href="" class="btn btnReset">RESET</a>

            </div><br>

            <div class="display_result hide"></div>

        </form>

    </main>


    <script>


       document.querySelector('#frmCalc').onsubmit  = (e) => {

            e.preventDefault()

            let i=0, chk=0;

            let display = document.querySelector('.display_result'),

               arr = document.getElementById("val_num");

                num_val = 0;

                num_val  = parseInt(arr.value);

                 


           for(i=2; i<num_val; i++)

            {

            if(num_val%2==0)

                {

                 chk++;

                 break;

                 }

       }

if(chk==0)

   result = num_val  + " is a Prime Number";

else

  result = num_val  + " is not a Prime Number";

           

            display.classList.remove('hide');

            display.innerHTML = "<h1>" + result + "</h1>";

      }

    </script>

</body>

</html>

My IT Consulting Services

Simple Password in C

Simple Password in C

 A simple password program that I wrote using 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


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

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

#include <string.h>


/* password.c

   Author : Jake Rodriguez Pomperada, MAED-IT, MIT

   jakerpomperada.blogspot.com and jakerpomperada.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines  */


int main()

{

char password[]="123admin";

char pass[10];


printf("\n\n");

printf("\tSimple Password in C");

printf("\n\n");

do

{

    

      printf("\n");

printf("\tGive your password : ");

gets(pass);

if(strcmp(password,pass)!=0) {

printf("\n");

printf("\tInvalid Password. Try Again\n");

} else {

printf("\n");

    printf("\tPassword Accepted. Welcome To The System.\n");

}

}while(strcmp(password,pass)!=0);

}



Print 100, 90, 80, 70, 60 and 50 in C

Print 100, 90, 80, 70, 60 and 50 in C

 A simple program that I wrote using C programming language to print a series of numbers 100, 90, 80, 70, 60, and 50 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

#include <stdio.h>


int main() {

int a=0;

printf("\n\n");

printf("\tPrint 100, 90, 80, 70, 60 and 50 in C");

printf("\n\n\t");

for (a=100; a>=50; a-=10) {  

printf("%3d",a);

}

printf("\n\n");

printf("\tEnd of Program");

printf("\n\n");

}

Thursday, April 14, 2022

First and Last Number in C#

First and Last Number in C#

 A simple program to ask the user to give any number and then the program will find the first and last digit 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


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

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.Collections.Generic;
using System.Text;

namespace ConsoleApplication1


{
    class Program
    {
    
        
        static void Main(string[] args)
        {

            int num_val = 0;
            
            int last = 0;
            Console.WriteLine("\n");
            Console.WriteLine("\tFirst and Last Number in C#");
            Console.WriteLine("\n");
            Console.Write("\tGive any number: ");
            num_val = Convert.ToInt32(Console.ReadLine());
            last = num_val % 10;

            while (num_val >= 10)
            {
                num_val = num_val / 10;
            }

            Console.WriteLine("\n");
            Console.WriteLine("\tThe first digit : " + num_val);
            Console.WriteLine("\n");
             Console.WriteLine("\tThe last digit  : " + last);
            Console.WriteLine("\n");
            Console.WriteLine("\tEnd of Program");
            Console.WriteLine("\n");
            Console.ReadLine();
        }
    }
}

Wednesday, April 13, 2022

Print 100, 90,80,70,60,50 and 40 in C++

Print 100, 90,80,70,60,50 and 40 in C++

 A program that will display a series of numbers from 100, 90, 80, 70, 60, 50 and  40 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


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

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

// print_100_40.cpp
// Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.com and www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

#include <iostream>
#include <iomanip>

int main()
{
    std::cout <<"\n\n";
    std::cout <<"\tPrint 100, 90,80,70,60,50 and 40 in C++";
    std::cout <<"\n\n";
    std::cout <<"\t";
    for (int a=100; a>=40; a-=10) {
        std::cout <<std::setw(3) << a <<std::setw(3);
    }
    
    std::cout <<"\n\n";
    std::cout <<"\tEnd of Program";
    std::cout <<"\n\n";
}

Money Bill Denominator Using Scala

Money Bill Denominator Using Scala

 Machine Problem 

Write a program  that will ask the amount from the user and then our program will count how many one thousand, five hundred, two hundred, one hundred, fifty, and twenty bills based on Philippine money currency denomination.

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


/* money_bill_denominator.scala

   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

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

   jakerpomperada@gmail.com

   November 11, 2021  9:13 PM Thursday

   Bacolod City, Negros Occidental

 */



import java.util.Scanner;


object money_bill_denominator {


  def main(args: Array[String]) : Unit = {


    var amt : Int = 0;  var thousand : Int = 0; 

    var five_hund: Int = 0 ;  var two_hundreds : Int = 0; 

    var hundreds : Int = 0;  var fifty : Int = 0;

    var twentys : Int = 0;


    var input = new Scanner(System.in);


    print("\n");

    print("\tMoney Bill Denominator Using Scala");

    print("\n\n");

    print("\tEnter an Amount : ");

    amt = input.nextInt();


    thousand = amt/1000;

    amt = amt%1000;

    five_hund = amt/500;

    amt = amt%500;

    two_hundreds = amt/200;

    amt = amt%200;

    hundreds = amt/100;

    amt = amt%100;

    fifty = amt/50;

    amt = amt%50;

    twentys = amt/20;

    amt = amt%20;


  print("\n");

  printf("\tDisplay Report\n")

  print("\n");

  printf("\tNumber of 1000 Notes  : " + thousand  + "\n");

  printf("\tNumber of 500 Notes   : "  + five_hund  + "\n");

  printf("\tNumber of 200 Notes   : "  + two_hundreds + "\n");

  printf("\tNumber of 100 Notes   : "  + hundreds + "\n");

  printf("\tNumber of 50 Notes    : "   + fifty + "\n");

  printf("\tNumber of 20 Notes    : "   + twentys  + "\n");


  print("\n");

  print("\tEND OF PROGRAM");

  print("\n\n");

  }

}


Simple Yearly Interest Calculator in JavaScript

Simple Yearly Interest Calculator in JavaScript

 A simple yearly interest calculator is written in JavaScript to solve the loan of the customer.

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


<!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>SIMPLE YEARLY INTEREST CALCULATOR</title>

    <style>

        * {

            box-sizing: border-box;

            margin: 0;

            padding: 0;

        }

        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background-color: #7A819F;

            color: #2B2E3E;

            font-family: sans-serif;

        }

        main {

            padding: 50px;

            border-radius: 10px;

            background-color: #D9D4D0;

            min-width: 500px;

        }

        h1 {

            margin-bottom: 5px;

            font-size: 28px;

            text-align: center;

        }

        h2 {

            margin-bottom: 30px;

            font-size: 20px;

            text-align: center;

        }

        .block {

            margin: 0 auto 12px;

            display: flex;

            align-items: center;


        }

        label {

            display: block;

            width: 35%;

            line-height: 40px;

            background-color: #47356E;

            color: #eee;

            text-align: center;

        }

        input {

            padding: 10px;

            width: 65%;

            font-size: 14px;

            border-radius: 0 5px 5px 0;

            border: 2px solid #000;

            outline: none;

        }

        .btnBlock {

            display: flex;

            width: 100%;

        }

        .btn {

            display: inline-block;

            padding: 15px;

            background-color: #CD8F3C;

            color: #fff;

            outline: none; 

            border: none;

            cursor: pointer;

            width: 150px;

            width: 50%;

            font-size: 16px;

            text-decoration: none;

            text-align: center;

            transition: all .2s;

        }

        .btnReset {

            background-color: #6B838E;

        }

        .btn:hover {

            opacity: 0.9;

        }

        .total {

            display: block;

            width: 100%;

            margin-top: 12px;

            padding: 20px 0;

            background-color: #2F4C58;

            font-size: 16px;

            text-align:center;

            color: #f3f3f3;

            line-height: 1.5;

        }

        .hide {

            display: none;

        }

    </style>

</head>

<body>

    <main class="container">

        <h1>SIMPLE YEARLY INTEREST<br>CALCULATOR</h1>

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

        <form action="" id="frmCalc">

            <div class="block">

                <label for="grade1">Principal Amount:</label>

                <input type="number" min="1" id="principal" autofocus required>

            </div>

            <div class="block">

                <label for="grade2">Interest Rate (%):</label>

                <input type="number" min="0" max="100" id="rate" required>

            </div>

            <div class="block">

                <label for="grade3">Time in years:</label>

                <input type="number" id="time" required>

            </div>

            <div class="btnBlock">

                <button type="submit" class="btn">CALCULATE</button>

                <a href="" class="btn btnReset">RESET</a>

            </div>

            <div class="total hide"></div>

        </form>

    </main>


    <script>

        document.querySelector('#frmCalc').onsubmit  = (e) => {

            e.preventDefault()

            let total = document.querySelector('.total'),

                interest = document.querySelector('.interest'),

                inputs = document.querySelectorAll('input[type="number"]'),

                calc = 1,

                monthly = 0;

                

            calc = (inputs[0].value * inputs[1].value)/100;

            totalAmount = parseInt(inputs[0].value) + parseInt(calc);

            monthly = totalAmount/(inputs[2].value * 12);

      

            total.classList.remove('hide')

            total.innerHTML = 'Total Amount is: '+totalAmount.toFixed(2)+'<br>'+

                            'Monthly Payment is: '+monthly.toFixed(2)+'<br>'+

                            'Total Interest is: '+calc.toFixed(2)

        }

    </script>

</body>

</html>

Tuesday, April 12, 2022

Grade Checker With Remarks in Visual Basic NET

Grade Checker With Remarks in VB.NET

 A simple program to check if the student given grade is a passing or failing grade using Microsoft Visual Basic NET 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

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim grade As Integer
        grade = Val(TextBox1.Text)

        If (grade >= 75) Then
            MessageBox.Show("Grade : " & grade & vbCrLf & "Remarks :" & "PASSED")
        Else
            MessageBox.Show("Grade : " & grade & vbCrLf & "Remarks :" & "FAILED")
        End If
    End Sub

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

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


Odd and Even Numbers Using Functions and Arrays in C++