Categories
PHP

Add Record in PHP and MySQL

This code shows you how to add a record in MySQL database using PHP as my programming language.

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.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.unlimitedbooksph.com/

Program Listing

add.php

<html>
<head>
 <title>Add Persons Record in PHP and MySQL</title>
</head>

<body>
<?php

include_once("config.php");

if(isset($_POST['Submit'])) { 
  $fname = mysqli_real_escape_string($mysqli, $_POST['fname']);
    $lname = mysqli_real_escape_string($mysqli, $_POST['lname']);
    $mname = mysqli_real_escape_string($mysqli, $_POST['mname']);
    $gender = mysqli_real_escape_string($mysqli, $_POST['gender']);
    
    $status = mysqli_real_escape_string($mysqli, $_POST['status']);
    $bdate = mysqli_real_escape_string($mysqli, $_POST['bdate']);
    $bplace = mysqli_real_escape_string($mysqli, $_POST['bplace']);
    $address = mysqli_real_escape_string($mysqli, $_POST['address']);
    $nationality = mysqli_real_escape_string($mysqli, $_POST['nationality']);
   
 if(empty($fname) || empty($lname) || empty($gender)) {
    
  if(empty($fname)) {
   echo "<font color='red'>First Name field is empty.</font><br/>";
  }
  
  if(empty($lname)) {
   echo "<font color='red'>Last Name field is empty.</font><br/>";
  }
  
  if(empty($gender)) {
   echo "<font color='red'>Gender field is empty.</font><br/>";
  }
  
  echo "<br/><a href='javascript:self.history.back();'>Go Back</a>";
 } else { 


  $result = mysqli_query($mysqli, "INSERT INTO student(fname,lname,gcode,mname,status,bdate,bplace,address,nationality) VALUES('$fname','$lname','$gender','$mname','$status','$bdate','$bplace','$address','$nationality')");
        
        echo"<script>alert('Data added successfully');window.location.href='index.php'</script>";
  
 }
}
?>
</body>

</html>
Categories
C

Grading System in C

A simple program that I wrote to show database development using Binary File in C programming language. I called this application Student Grading Database System in C which enables the user to add, edit, delete, view and quit student grade records it stores the record of the student in the binary file. I am using Dev C++ as my C compiler but the I code can also run in a typical Borland Turbo C or Turbo C++ compiler in DOS.

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.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/

Main Menu
Add Record
Update Record
Delete Record
Search Record
View Record

Program Listing

/* grades.c
   Author   : Mr. Jake Rodriguez Pomperada,BSCS,MAED-IT
   Tool     : Dev C++ 5.11
   Date     : April 19, 2019  Friday  5:23 PM
   Website  : www.jakerpomperada.com
   Email    : jake_pomperada@tup.edu.ph and jakerpomperada@gmail.com
   Location : Bacolod City, Negros Occidental
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
main( )
{
	FILE *fp, *ft ;
	char another, choice ;
	struct student
	{
		char stud_id_no[300];
		char name[300];
		char course[300];
		char subject[300];
		float prelim,midterm,endterm,final_grade;
	} ;
	struct student grade;
	char student_id[300];
	long int recsize;
int flag=0;
	fp = fopen ("GRADE_DB.DAT", "rb+" ) ;
	if ( fp == NULL )
	{
		fp = fopen ( "GRADE_DB.DAT", "wb+" ) ;
		if ( fp == NULL )
		{
			puts ( "Cannot open file" ) ;
			exit(0) ;
		}
	}
	recsize = sizeof ( grade ) ;
	while ( 1 )
	{
system("CLS");
printf("\n");
		printf("\n======================================");
		printf("\n");
		printf("\nSTUDENT GRADING DATABASE SYSTEM ");
		printf("\n");
		printf("\n======================================");
		printf("\n\n");
		printf ( "1. INSERT STUDENT RECORD" ) ;
		printf("\n");
		printf ( "2. BROWSE STUDENT RECORD" ) ;
		printf("\n");
		printf ( "3. EDIT STUDENT RECORDS" ) ;
		printf("\n");
		printf ( "4. FIND STUDENT RECORDS" ) ;
		printf("\n");
		printf ( "5. REMOVE STUDENT RECORDS" ) ;
		printf("\n");
		printf ( "6. QUIT PROGRAM" ) ;
		printf("\n\n");
		printf ("SELECT YOUR OPTION :=> " ) ;
		fflush (stdin) ;
		choice = getche() ;
		switch ( choice )
		{
			case '1' :
				fseek ( fp, 0 , SEEK_END ) ;
				another = 'Y' ;
				while ( another == 'Y' )
				{
					system("cls");
					printf("\n\n");
					printf("=== INSERT NEW STUDENT GRADE RECORD ===");
					printf("\n\n");
					printf("Enter Student ID Number : ");
					scanf("%s",&grade.stud_id_no);
					printf("Enter Student Name: ");
					fflush (stdin) ;
					gets(grade.name);
					printf("Enter Course : ");
					fflush (stdin) ;
					gets(grade.course);
					printf("Enter Subject : ");
					fflush (stdin) ;
					gets(grade.subject);
					printf("Enter Prelim Grade: ");
					scanf("%f",&grade.prelim);
					printf("Enter Midtem Grade: ");
					scanf("%f",&grade.midterm);
					printf("Enter Endterm Grade: ");
					scanf("%f",&grade.endterm);
					grade.final_grade = (grade.prelim * 0.30) + (grade.midterm * 0.30) + (grade.endterm * 0.40);
					printf("\n");
					printf("\n Student Final Grade : %2.0f",grade.final_grade);
					fwrite (&grade, recsize, 1, fp ) ;
					printf("\n\n");
					printf ( "\nAdd New Student Record (Y/N) : " ) ;
					fflush (stdin) ;
					another = toupper(getche()) ;
				}
				break ;
			case '2' :
	system("cls");
				rewind ( fp );
				printf("\n\n");
printf("=== VIEW STUDENT GRADE RECORD ===");
printf("\n\n");
		while ( fread ( &grade, recsize, 1, fp ) == 1 )
{
printf("\n");
printf("\n ID Number : %s",grade.stud_id_no);
printf("\n Name: %s",grade.name);
printf("\n Course : %s",grade.course);
printf("\n Subject : %s",grade.subject);
printf("\n Prelim Grade: %2.0f",grade.prelim);
printf("\n Midterm Grade: %2.0f",grade.midterm);
printf("\n Endterm Grade: %2.0f",grade.endterm);
printf("\n");
grade.final_grade = (grade.prelim * 0.30) + (grade.midterm * 0.30) + (grade.endterm * 0.40);
printf("\n Student Final Grade : %2.0f",grade.final_grade);
		 }
printf("\n\n");
system("pause");
				break ;
			case '3' :
			another = 'Y' ;
				while ( another == 'Y' )
				{
				system("cls");
		printf("=== EDIT STUDENT GRADE RECORD ===");
		printf("\n\n");
					printf("Enter Student ID Number : ");
scanf("%s",&student_id);
					rewind ( fp ) ;
					printf("\n");
					while ( fread ( &grade, recsize, 1, fp ) == 1 )
					{
						if ( strcmp ( grade.stud_id_no, student_id) == 0 )
						{
							printf("Enter Student ID Number : ");
fflush (stdin) ;
gets(grade.stud_id_no);
							printf("Enter Student Name : ");
							fflush ( stdin ) ;
							gets(grade.name);
					printf("Enter Course: ");
							fflush ( stdin ) ;
							gets(grade.course);
							printf("Enter Subject : ");
							fflush ( stdin ) ;
							gets(grade.subject);
							printf("Enter Prelim Grade : ");
							scanf("%f",&grade.prelim);
							printf("Enter Midtem Grade : ");
							scanf("%f",&grade.midterm);
							printf("Enter Endterm Grade: ");
							scanf("%f",&grade.endterm);
							printf("\n");
							grade.final_grade = (grade.prelim * 0.20) + (grade.midterm * 0.30) + (grade.endterm * 0.50);
							printf("\n Student Final Grade : %2.0f",grade.final_grade);
							fseek ( fp, - recsize, SEEK_CUR ) ;
							fwrite ( &grade, recsize, 1, fp ) ;
							break ;
						}
					}
			 if (strcmp(grade.stud_id_no,student_id) != 0 )
{
printf("\n\n");
printf("No Student Record in the Database.");
printf("\n");
system("pause");
break;
}
printf("\n\n");
					printf ( "\nEdit Another Student Record (Y/N) : " ) ;
					fflush ( stdin ) ;
					another = toupper(getche());
				}
				break ;
	case '4' :
	rewind ( fp ) ;
	another = 'Y' ;
				while ( another == 'Y' )
				{
				system("cls");
		printf("=== Find Student Records ===");
		printf("\n\n");
					printf("Enter Student ID Number : ");
scanf("%s",&student_id);
					printf("\n");
					rewind ( fp ) ;
					while ( fread ( &grade, recsize, 1, fp ) == 1 )
					{
						if ( strcmp (grade.stud_id_no,student_id) == 0 )
						{
printf("\n");
					printf("\n ID Number: %s",grade.stud_id_no);
					printf("\n Name: %s",grade.name);
					printf("\n Course : %s",grade.course);
		printf("\n Subject : %s",grade.subject);
printf("\n Prelim Grade: %2.0f",grade.prelim);
printf("\n Midterm Grade: %2.0f",grade.midterm);
printf("\n Endterm Grade: %2.0f",grade.endterm);
printf("\n");
grade.final_grade = (grade.prelim * 0.30) + (grade.midterm * 0.30) + (grade.endterm * 0.40);
printf("\n Student Final Grade : %2.0f",grade.final_grade);
printf("\n\n");
system("pause");
 break;
						}
}
if (strcmp(grade.stud_id_no,student_id) != 0 )
{
printf("\n\n");
printf("No Student Record found in the Database.");
printf("\n");
system("pause");
break;
}
printf("\n\n");
					printf ( "\n Find Another Student Record (Y/N) : " ) ;
					fflush ( stdin ) ;
					another = toupper(getche());
				}
				break ;
			case '5' :
				another = 'Y' ;
				while ( another == 'Y' )
				{
					system("cls");
					printf("=== REMOVE STUDENT GRADE RECORD ===");
					printf("\n\n");
					printf("Enter Student ID Number : ");
					scanf("%s",&student_id);
					printf("\n");
					ft = fopen ( "TEMP.DAT", "wb" ) ;
					rewind ( fp ) ;
					while ( fread ( &grade, recsize, 1, fp ) == 1 )
					{
						if ( strcmp (grade.stud_id_no, student_id) != 0 )
							fwrite ( &grade, recsize, 1, ft ) ;
							else
							flag=1;
					}
					fclose ( fp ) ;
					fclose ( ft ) ;
					remove ( "GRADE_DB.DAT" ) ;
					rename ( "TEMP.DAT", "GRADE_DB.DAT" ) ;
				fp = fopen ( "GRADE_DB.DAT", "rb+" ) ;
 if(flag==1) {
printf("\n\n");
printf("Record Successfully Deleted From the Database.");
 printf("\n");
system("pause");
}
					else if (flag!=1) {
printf("\n\n");
printf("Record Not Found in the Database.");
printf("\n");
system("pause");
}
printf("\n\n");
					printf( "Remove Another Student Record (Y/N) : " ) ;
					fflush (stdin) ;
					another = toupper(getche());
				}
				break ;
			case '6' :
				fclose ( fp ) ;
				printf("\n\n");
				printf("END OF PROGRAM");
				printf("\n\n");
				system("PAUSE");
				exit(0);
		}
	}
}
Categories
Java

Sum of Two Numbers in Java

A simple java program to accept two numbers and then it will compute the sum of two numbers and display the results on the screen.

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.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/

Program Listing

package com.example.java;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.print("Enter a numeric value: ");
        String input1 = sc.nextLine();
        double d1 = Double.parseDouble(input1);

        System.out.print("Enter a numeric value: ");
        String input2 = sc.nextLine();
        double d2 = Double.parseDouble(input2);

        double result = d1 + d2;

        System.out.println("The answer is " + result);

    }
}
Categories
JavaScript

Feet To Inches Converter Vice Versa in JavaScript

A simple program that I wrote using JavaScript programming language to ask value in feet or inches and it will convert it into feet or inches equivalent.

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.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
<hmtl>
<head>
  <title>Feet To Inches Converter  Vice Versa in JavaScript</title>
 </head>
 <style>
   body {
    font-family:arial;
    size:12px;
  }
 </style>
<body onload="init()">
  <p>Feet To Inches Converter Vice Versa in JavaScript</p>
  <table cellspacing="6">
    <tr valign="top">
      <td><input id="feet" size="20" onfocus="reset()" /><br />Feet</td>
      <td><input type="button" value="Ok" onclick="convert()" title="Click here to convert" /></td>
      <td><input id="inches" size="20" onfocus="reset()" /><br />Inches</td>
      <td><input type="button" value="Clear All" onclick="reset()" title="Click here to clear the text box." /></td>
    </tr>
  </table>
  <script>
  
  var feet, inches;

function init(){
  feet = document.getElementById('feet');
  inches = document.getElementById('inches');
}

function reset(){
  feet.value = "";
  inches.value = "";
}

function convert(){
  var f = feet.value.replace(/ /, "");
  if (f){
    inches.value = f * 12;
  }
  
  var i = inches.value.replace(/ /, "");
  if (i){
    feet.value = i / 12;
  }
}

</script>
</body>
</html>
Categories
C

Perfect Square Checker in C Language

A simple program that I wrote to ask the user to give a number and then the program will check if the given number by the user is a perfect square or not.

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.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
/* perfect_square.c
   Jake R. Pomperada
   December 25, 2019 
   Wednesday   */

#include<stdio.h>

int main()
{
    printf("\n\n");
	printf("\tPerfect Square Checker in C Language");
    printf("\n\n");
      int i=0, number=0;
    printf("\tGive a Number : ");
    scanf("%d", &number);

   
    for(i = 0; i <= number; i++)
    {
        if(number == i*i)
        {
            printf("\n");
            printf("\tThe given number %d is a Perfect Square Number.",number);
            return 0;  
        }
    }
     printf("\n");
     printf("\tThe given number %d is Not Perfect Square Number.",number);
     printf("\n");
     printf("\tEnd of Program");
     printf("\n");
}
Categories
C++

Automatic Teller Machine Simulation in C++

A simple program that I wrote using a C++ programming language to simulate the Automatic Teller Machine operation.

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.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/

Sample Program Output
#include <iostream>

// Created By Mr. Jake R. Pomperada, MAED-IT
// C++   October 19, 2018
// www.jakerpomperada.com

using namespace std;


int main()

{
		int bill500=0, bill200=0, bill100=0, total_balance=0;
		int withdraw=0, money_left=0;
		int reciv500=0, reciv200=0, reciv100=0;
		char withdraw_again[2] = "N";
		 
		 system("COLOR F0");  
	     cout <<"\n\n";
         cout <<"\t Automatic Teller Machine Simulation in C++";
		 cout <<"\n\n";
		 cout <<"\tHow many P500 bills: ";
		 cin >>bill500;
		 cout <<"\tHow many PHP 200 bills: ";
		 cin >>bill200;
		 cout <<"\tHow many PHP 100 bills: ";
		 cin >> bill100;
		 total_balance = 	(bill500 * 500 + (bill200 * 200 +  (bill100 * 100)) );

		 cout <<"\tTotal Balance: PHP :" << total_balance;

	 do

	 {
		 cout <<"\n";
		 cout <<"\n";

		 cout <<"\tEnter amount to withdraw: PHP ";
		 cin >>withdraw;
		 money_left = withdraw ;

		 if  (withdraw > total_balance)
				{
				cout <<"\tWithdraw amount greater than total balance.  ";
				cout <<"\n";
				}
		 if (withdraw < total_balance)
		 {
		 if  (money_left >= 500) 
				{
				 reciv500 = int(money_left / 500);
				 if (reciv500 > bill500)  reciv500 = bill500;

				 money_left = money_left - (reciv500 * 500);
				 bill500 = bill500 - reciv500;
				}

		 if (money_left >= 200) 
			 {
				 reciv200 = int(money_left / 200);
				 if (reciv200 > bill200)  reciv200 = bill200;
				 money_left = money_left - (reciv200 * 200);
				 bill200 = bill200 - reciv200;
			 }

		 if (money_left >= 100) 
			  {
				 reciv100 = int(money_left / 100);
				 if (reciv100 > bill100)  reciv100 = bill100;
				 money_left = money_left - (reciv100 * 100);
				 bill100 = bill100 - reciv100;
				}

				cout <<"\n";
				cout <<"\n";
				cout <<"\tYou will receive:";
				cout <<"\n";
				cout <<"\t  PHP 500 bill : " << reciv500;
				cout <<"\n";
				cout <<"\t  PHP 200 bill : " << reciv200;
				cout <<"\n";
				cout <<"\t  PHP 100 bill : " << reciv100;
				cout <<"\n";


				total_balance = total_balance - withdraw;

				cout <<"\tYour current balance is: PHP " <<total_balance;
				cout <<"\n";
				cout <<"\n";
				cout <<"\tYou only have balance of:";
				cout <<"\n";
				cout <<"\t PHP 500 bill   : "  << bill500;
				cout <<"\n";
				cout <<"\t  PHP 200 bill  : " << bill200;
				cout <<"\n";
				cout <<"\t  PHP 100 bill  : " << bill100;
				cout <<"\n"; 
 				cout <<"\n\n";
				cout <<"\tAnother Withdraw Again ? Y/N : ";
				cin >>withdraw_again;

		 }

	 }  while (withdraw_again == "Y" || withdraw_again == "y");
     cout <<"\n\n";
     cout <<"\tEnd of Program";
     cout <<"\n\n";
}

Categories
JavaScript

Inches To Centimeter Converter in JavaScript

I wrote this program to accept values in inches and then convert it into centimeter values using JavaScript programming language.

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.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
<hmtl>
<head>
  <title>Inches To Centimeter Converter in JavaScript</title>
 </head>
 <style>
   body {
    font-family:arial;
    size:12px;
  }
 </style>
<body onload="init()">
  <p>Inches To Centimeter Converter in JavaScript</p>
  <table cellspacing="6">
    <tr valign="top">
      <td><input id="inch" size="20" onfocus="reset()" /><br />Inches</td>
      <td><input type="button" value="Ok" onclick="convert()" title="Click here to convert" /></td>
      <td><input id="cm" size="20" onfocus="reset()" /><br />Centimeter</td>
      <td><input type="button" value="Clear All" onclick="reset()" title="Click here to clear the text box." /></td>
    </tr>
  </table>
  <script>
  
  var inf, cmf;

function init(){
  inf = document.getElementById('inch');
  cmf = document.getElementById('cm');
}

function reset(){
  inf.value = "";
  cmf.value = "";
}

function convert(){
  var i = inf.value.replace(/ /, "");
  if (i){
    cmf.value = i * 2.54;
  }
  
  var c = cmf.value.replace(/ /, "");
  if (c){
    inf.value = c / 2.54;
  }
}

</script>
</body>
</html>
Categories
Perl

Grade Checker in Perl

I wrote this program using Perl programming language to ask the user to give a grade and then the program will check if the given grade by the user pass or fails using conditional statement if in Perl.

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.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
# grade.pl
# Author  : Jake Rodriguez Pomperada,MAED-IT,MIT
# Date    : March 25, 2020  11:58 AM
# Website : http://www.jakerpomperada.com
# Email   : jakerpomperada@gmail.com

print "\n\n";
print "\tGrade Checker in Perl";
print "\n\n";
print "\tEnter your Grade  : ";
chomp($grade=<>);

if ($grade >= 75) {
    print "\n";
    print "\tYour grade is $grade%. You pass the subject.";
}

if ($grade < 75) {
print "\n";
print "\tYour grade is $grade%. You fail the subject.";
}

print "\n\n";
print "\tEnd of the Program";
print "\n\n";
Categories
Perl

Odd and Even Number Checker in PERL

I simple program that I wrote to ask the user to give a number and then our program will check if the given number is an odd or even number using Perl as my programming language. The text editor that I used in writing this program is Visual Studio Code from Microsoft that is free to download and use.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, 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/

Sample Program Output
# odd_even.pl
# Author : Jake Rodriguez Pomperada,MAED-IT
# Date   : October 30, 2019   5:21 AM  Wednesday


print "\n\n";
print "\tOdd and Even Number Checker in PERL";
print "\n\n";
print "\tGive a Number : ";
chomp($num_val =<>);

if ($num_val % 2 == 0) {
    print "\n";
    print "\tThe given number $num_val is an EVEN number.";
}
else {
    print "\n";
    print "\tThe given number $num_val is an ODD number.";
}
print "\n\n";
print "\tEnd of the Program";
Categories
NodeJS

Product of Two Numbers in NodeJS

A simple program to ask the user to give two numbers and then the program will compute the product of two numbers using NodeJS.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, 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
/* product.js                          */
/* Product of Two Numbers in NodeJs    */
/* March 22,2020  Thursday   14:34 PM  */
/* Written By: Mr. Jake R. Pomperada   */


var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

console.log('\n');
console.log('Product of Two Numbers in NodeJS\n');
console.log('Author : Jake R. Pomperada');
console.log('\n');
rl.question('Enter first value : ', function (x) {
   rl.question('Enter  second value : ', function (y) {
  var a = parseInt(x);
  var b = parseInt(y);
        var product = (a*b);
  
       console.log('\n');
       console.log('The product of ',a, ' and ',b, ' is ' ,product,'.');
    console.log('\n');
       console.log('End of Program');
        rl.close();
    });
});