Categories
Bash

Leap Year Checker in Bash

In this article, we will learn how to write a bash shell program to ask the user to give a year, and then the program will check and determine whether the given year is a leap year or not a leap year.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, 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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Program Listing

printf "\n\n"

printf "\tLeap Year Checker in Bash"

printf "\n\n"

printf "\tGive a Year: "

read y



printf "\n\n"



year=$y



y=$(( $y % 4 ))

if [ $y -eq 0 ]

then

    printf "\tThe given year $year is Leap Year!"

else



  printf "\tThe given $year is not a Leap Year!"

fi



printf "\n\n"

printf "\tEnd of Program"

printf "\n"
Categories
C#

Positive and Negative Numbers in C#

A simple program that I wrote using C# to ask the user to give a number and then the program will check and determine whether the given number is a positive or negative number.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Positive_and_Negative_Numbers
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int a = 0;
            a = Convert.ToInt32(textBox1.Text);

         if (a >= 0)
            {
                MessageBox.Show("The given number " + a +  " is a Positive Number.",
                 "The Result");
            } else
            {

                MessageBox.Show("The given number " + a + " is a Negative Number.",
                 "The Result");
            }
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox1.Focus();
        }
    }
}
Categories
C

Student Grades Checker in C Language

A simple program that I wrote using C programming language to compute and check the students grades.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/

Sample Program Output
/*pass_fail.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : June 13, 2020  7:26 AM  Saturday
   Location : Bacolod City, Negros Occidental
   Tool     : Dev C++ Version 5.11
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com

*/
#include <stdio.h>

int grades[6],a=0;
int count_pass=0, count_fail=0;

void display_title(void);
void get_data(void);
void display_pass(void);
void display_fail(void);
void display_result(void);

void display_title(void)
{
     printf("\n\n");
	 printf("\t\tStudent Grades Checker");
     printf("\n\n\n");
}

void get_data(void)
{
  for (a=1; a<=5; a+=1) {
  	      printf("\tEnter Grade No. %d : ",a);
  	      scanf("%d",&a[grades]);
      }
}

void display_pass(void)
{
     printf("\n\n");
     printf("\tList of PASSED Grades ");
     printf("\n\n");
        for (a=1; a<=5; a+=1) {
          if (a[grades] >= 75) {
          	printf("\t %d ",a[grades]);
               count_pass++;
              }
         }
  }

void display_fail(void)
{
      printf("\n\n");
      printf("\tList of FAILED Grades ");
      printf("\n\n");
       for (a=1; a<=5; a+=1) {

           if (a[grades] < 75) {
               printf("\t %d ",a[grades]);
              count_fail++;
              }
       }
}

void display_result(void)
{
printf("\n\n");
printf("\tNumber of Passed Grades => %d ",count_pass);
printf("\n\n");
printf("\tNumber of Failed Grades => %d ",count_fail);
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
}
 int main() {
    display_title();
    get_data();
    display_pass();
    display_fail();
    display_result();
    }
 // End of Code
Categories
JavaScript

Positive and Negative Number Using JavaScript Ternary Operator

I wrote this program that will ask the user to give a number and then the program will check and determine if the given number by the user is a positive or negative number using JavaScript ternary operator 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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Screenshot if the given number is positive.
Screenshot of the given number is negative.
<html>
 <head>
   <title>Positive and Negative Number Using JavaScript Ternary Operator</title>
</head>   
<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        size:15px;
    }
</style>
<body>

    <h2>Positive and Negative Number Using JavaScript Ternary Operator</h2>
    <p> Written By Jake R. Pomperada</p>
    
   Give a Number &nbsp;&nbsp;<input id="num_val" value="" />


     <br><br>
    <button onclick="Check()">Ok</button>
    <br>
    <p id="demo"></p>
    
    <script>
    function Check() {
      var num_val, result;
      num_val = Number(document.getElementById("num_val").value);
      if (isNaN(num_val)) {
        result = "The given value is not a number. Try Again.";
      } else {
        result = (num_val < 0) ? "The given number is Negative." : "The given number is Positive.";
      }
      document.getElementById("demo").innerHTML = result;
    }
    </script>
</body>
</html>
Categories
C++

Reverse an Array in C++

I wrote this program using a C++ programming language to ask the user to give how many items to be processed and then the program will ask a series of integer value and then the program will reverse the arrangement of given numbers using one-dimensional array in C++.

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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
#include <iostream>

using namespace std;

int main()
{
	int Arr[200],n=0,temp=0,i=0,j=0;
    
    cout <<"\n\n";
    cout <<"\tReverse an Array in C++";
    cout <<"\n\n";
	cout<<"\tHow many elements? : ";
	cin>>n;
    cout <<"\n\n";
	for(i=0;i<n;i++)
	{
		cout<<"\tEnter element "<<i+1<<":";
		cin>>Arr[i];
	}

	for(i=0,j=n-1;i<n/2;i++,j--)
	{
		temp=Arr[i];
		Arr[i]=Arr[j];
		Arr[j]=temp;
	}
    cout <<"\n\n";
	cout<<"\tReverse array results"<<endl;
	cout <<"\n\n";
    cout <<"\t";
	for(i=0;i<n;i++) {

		cout<<" "<< Arr[i]<<" ";
	}
	
	 cout <<"\n\n";
	 cout <<"\tEnd of Program";
     cout <<"\n\n";

}

Categories
JQuery

Addition of Three Numbers in JQuery

I  wrote this simple program that I wrote using JQuery a JavaScript library to ask the user to give three numbers and then the program will sum the values of three numbers 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.My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
Sample Program Output
Program Listing

index.htm

<!doctype html>
<html>
<head>
     <script type='text/javascript' src='jquery/jquery.min.js'></script>
   <script type='text/javascript' src='add.js'></script>
</head>
<body>
 <h2> Addition of Three Numbers in JQuery </h2>
    <h4><i> Author Jake R. Pomperada,MAED-IT </i></h4>
 <br>
Enter the First number : <input id="first"><br>
Enter the Second number: <input id="second"><br>
Enter the Third number: <input id="third"><br><br>
The total sum is <input id="answer"><br><br>
<button id="btnAdd">Add</button>
<button id="btnClear">Clear</button>

</body>
</html>

add.js

// Code By Jake R. Pomperada,MAED-IT
// February 25, 2020

$(document).ready(function(){

$("#btnAdd").click(function(){
  var a,b,c;
a=Number(document.getElementById("first").value);
b=Number(document.getElementById("second").value);
c=Number(document.getElementById("third").value);
d= a + b+c;
document.getElementById("answer").value= d;

});



$("#btnClear").click(function(){

 document.getElementById('first').value="";
 document.getElementById('second').value="";
 document.getElementById('third').value="";
 document.getElementById('answer').value="";
 document.getElementById('first').focus();

});
});