Tuesday, November 28, 2017

Leap Year Checker in C

A program that I wrote using C language that will ask the user to give a year and then our program will check if the given year is a leap year or not.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.





Sample Program Output


Program Listing

leap.c


#include <stdio.h>

int main()
{
    int year=0;

    printf("Leap Year Checker in C");
    printf("\n\n");
    printf("Give a Year:  ");
    scanf("%d",&year);
   if(year%4 == 0)
        {
        if( year%100 == 0)
        {

            if ( year%400 == 0) {
                printf("\n\n");
                printf("The given %d is a leap year.", year);
                printf("\n\n");
                printf("End of Program");
                printf("\n\n");
            }
            else {
                printf("\n\n");
                printf("The given %d is not a leap year.", year);
                printf("\n\n");
                printf("End of Program");
                printf("\n\n");
            }
        }
        else {
            printf("\n\n");
            printf("The given %d is a leap year.", year );
            printf("\n\n");
            printf("End of Program");
            printf("\n\n");
        }
    }
    else {
        printf("\n\n");
        printf("The given %d is not a leap year.", year);
        printf("\n\n");
        printf("End of Program");
        printf("\n\n");
    }

    return 0;
}







Prime Number Checker in C

A program that I wrote using C language that will ask the user to give a number and then our program will determine if the given number in a prime number or not.  The code is very simple and easy to use.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.






Sample Program Output


Program Listing

prime.c

#include <stdio.h>

int main()
{
    int num=0, a=0, flag = 0;



    printf("Prime Number Checker in C");
    printf("\n\n");
    printf("Give a Number :  ");
    scanf("%d",&num);

    for(a=2; a<=num/2; a++)
    {

        if(num%a==0)
        {
            flag=1;
            break;
        }
    }

    if (flag==0) {
        printf("\n\n");
        printf("The number %d is a prime number.",num);
        printf("\n\n");
        printf("End of Program");
        printf("\n\n");
    }
    else {
        printf("\n\n");
        printf("The number %d is not a prime number.",num);
        printf("\n\n");
        printf("End of Program");
        printf("\n\n");
    }
    return 0;
}



Saturday, November 25, 2017

Loan Interest Solver in Visual Foxpro


A simple program that I wrote using Microsoft Visual Foxpro to compute the loan of the customer. The code is very straight forward and very short. Easy to understand.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.





Sample Program Output


Program Listing





Offering Website Design and Development Services








Let me introduce myself I am Mr. Jake R. Pomperada a freelance web developer currently residing here in Bacolod City, Negros Occidental Philippines. I have been a freelance developer for more than 10 years of experience. I am proficient in using PHP, HTML,CSS, Jquery, AngularJS and Javascript for web design and development.

I am currently offering my services in website design and development at a very affordable price here in Bacolod City and other clients who wants their website be develop. I offer free consultation for your web design and development needs.  

Interested clients can reach me in my email address jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

People here in the Philippines can contact me at my mobile number 09173084360.

My telephone number at home is +63 (034) 4335675.

Thank you.


Monday, November 20, 2017

Automatic ID Numbering Generator in PHP / MySQL

A sample code snippet that I wrote to help a friend in her thesis to generate ID numbering using PHP and MySQL.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.


Sample Program Output


Program Listing


display.php


<html>
<body>
<style type="text/css">
th,td{
border-width:0px 1px 1px 0px;
}
</style>
<?php
$counter=1;
mysql_connect('localhost','root','') or die(mysql_error());
mysql_select_db('profile')  or die(mysql_error());
$query=mysql_query("select * from user_table ")  or die(mysql_error());
echo'<table border="1" ><th >ID</th><th>Name</th><th>Work</th>';
while($res=mysql_fetch_array($query))
{
  echo'<tr><td>'.$counter.'</td><td>'.$res['name'].'</td><td>'.$res['work'].'</td></tr>';
  $counter++;
}
echo'</table>';
?>
</body>
</html>


id_user.sql

-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2017 at 08:55 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `profile`
--

-- --------------------------------------------------------

--
-- Table structure for table `user_table`
--

CREATE TABLE `user_table` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `work` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_table`
--

INSERT INTO `user_table` (`id`, `name`, `work`) VALUES
(1, 'ANA', 'JANITOR'),
(2, 'LANDO', 'DATA ENCODER'),
(4, 'ZANDRO', 'SECURITY GUARD'),
(5, 'MARK', 'PROGRAMMER'),
(6, 'LESLIE', 'SOFTWARE ENGINEER'),
(8, 'WARREN', 'FINANCIAL INVESTOR'),
(9, 'ALMA', 'SECONDARY TEACHER'),
(10, 'LORNA', 'MEDICAL TECHNOLOGIST'),
(13, 'AURORA', 'HAIR DRESSER'),
(14, 'RICKY', 'POLICEMAN');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `user_table`
--
ALTER TABLE `user_table`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `user_table`
--
ALTER TABLE `user_table`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;




User Password Management System in PHP / MySQL

A program that is being share to us by my friend Michelle Ignacio a web developer also here in the Philippines to demonstrate CRUD application to manage the user password in the system.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.



Sample Program Output




Thursday, November 16, 2017

Sum of Two Numbers in Visual Foxpro

Here is a sample program that will ask the user to give two numbers and then our program will compute the sum of two numbers using Microsoft Visual Foxpro.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.




Sample Program Output



Program Listing

sum.prg

ans="y"

do while ans="y"

                clear

                @2,5 Say "Sum of Two Numbers in Visual Foxpro"
                input "Enter First Value   : " to a
                input "Enter Second Value  : " to b
                
                sum_all = (a+b)
                
                @ 8,0 Say "The total sum is" Get sum_all Pict "99999"
                
                            

                accept "Do you want to continue y/n? : " to ans

enddo



Multiplication Table Generator in Visual Foxpro

Here is a sample program that will ask the user to give a number and then it will generate the corresponding multiplication table using Microsoft Visual Foxpro.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.




Sample Program Output


Program Listing

multiplication.prg

ans="y"

do while ans="y"

                clear

                @2,5 Say "Multiplication Table Generator in Visual Foxpro"
                input "Give the table to print :" to t

                i=1

                do while i <=10

                                p=t*i

                                ?str(t)+ "  *" + str(i,4) + "  = " + str(p,4)

                                i=i+1

                enddo

                accept "Do you want to continue y/n? : " to ans

enddo


Hello World in Visual Foxpro

In this article I would like to share with you a sample program to show hello world using Visual Foxpro. The code is very easy to understand and us.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.




Sample Program Output



Program Listing

hello.prg

set talk off
set echo off
@ 12,34 Say "Hello World in Visual Foxpro"


Sunday, November 12, 2017

Subtract Two Numbers in Visual Basic 6

Here is a simple program that will ask the user to give two numbers and then our program will compute the difference between two numbers provided by our user.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.







Sample Program Output


Program Listing

Private Sub Command1_Click()

Dim solve As Integer

solve = Val(Text1.Text) - Val(Text2.Text)

Label3.Caption = "The difference between " & Text1.Text & _
" and " & Text2.Text & " is " & solve & "."
End Sub

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

Private Sub Command3_Click()
End
End Sub




Friday, November 10, 2017

Grade Checker in C++

A very simple program to check the grade of the student using C++.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.


Program Listing

#include <iostream>

using namespace std;

 int grade(int a, int b, int c)
  {
      int solve=0;

      solve = (a+b+c) / 3;

      if (solve >= 75) {

           cout << "Your Average Grade is " <<solve << "." << endl;
           cout << "You Passed the Subject";
      }
      else
        {
           cout << "Your Average Grade is " <<solve << "." << endl;
           cout << "You Failed the Subject";
      }
  }

    main() {
          int grades[3];

          cout << "\t\t Grade Solver Version 1.0";
          cout << "\n\n";
          cout << "Enter the Three Grades : ";
          cin >> grades[0] >> grades[1] >> grades[2];
          cout << "\n\n";
          grade(grades[0], grades[1], grades[2]);
          cout << "\n\n";
          system("pause");
    }

Binary Search in C

A program to show binary search using C language.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.


Program Listing

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

void main( )
{
int arr[10] = { 1, 2, 3, 9, 11, 13, 17, 25, 57, 90 } ;
int mid, lower = 0 , upper = 9, num, flag = 1 ;

printf ( "Enter number to search: " ) ;
scanf ( "%d", &num ) ;

for ( mid = ( lower + upper ) / 2 ; lower <= upper ;
mid = ( lower + upper ) / 2 )
{
if ( arr[mid] == num )
{
printf ( "The number is at position %d in the array.", mid ) ;
flag = 0 ;
break ;
}
if ( arr[mid] > num )
upper = mid - 1 ;
else
lower = mid + 1 ;
}

if ( flag )
printf ( "Element is not present in the array." ) ;

}

Merge Sort in C

A program to show merge sort in C language.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.


Program Listing

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

void main( )
{
int a[5] = { 11, 2, 9, 13, 57 } ;
int b[5] = { 25, 17, 1, 90, 3 } ;
int c[10] ;
int i, j, k, temp ;

printf ( "Merge sort.\n" ) ;

printf ( "\nFirst array:\n" ) ;
for ( i = 0 ; i <= 4 ; i++ )
printf ( "%d\t", a[i] ) ;

printf ( "\n\nSecond array:\n" ) ;
for ( i = 0 ; i <= 4 ; i++ )
printf ( "%d\t", b[i] ) ;

for ( i = 0 ; i <= 3 ; i++ )
{
for ( j = i + 1 ; j <= 4 ; j++ )
{
if ( a[i] > a[j] )
{
temp = a[i] ;
a[i] = a[j] ;
a[j] = temp ;
}
if ( b[i] > b[j] )
{
temp = b[i] ;
b[i] = b[j] ;
b[j] = temp ;
}
}
}

for ( i = j = k = 0 ; i <= 9 ; )
{
if ( a[j] <=  b[k] )
c[i++] = a[j++] ;
else
c[i++] = b[k++] ;

if ( j == 5 || k == 5 )
break ;
}

for ( ; j <= 4 ; )
c[i++] = a[j++] ;

for ( ; k <= 4 ; )
c[i++] = b[k++] ;

printf ( "\n\nArray after sorting:\n") ;
for ( i = 0 ; i <= 9 ; i++ )
printf ( "%d\t", c[i] ) ;

}