Tuesday, November 27, 2018

Palindrome in C Using Pointers

A very simple program that will ask the user to give a string and then the program will check and determine if the given string is a palindrome or not using pointers in C.

I am currently accepting programming work, it projects, school 

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.

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



Sample Program Output



Program Listing

#include <stdio.h>
 
void stringUpr(char *s);
void stringLwr(char *s);
 
int main()
{
char string[100];
char *ptr,*rev;
printf("\n\n");
printf("\tPalindrome Program ");
printf("\n\n");
printf("\tGive a String : ");
gets(string);
ptr=string;
stringUpr(ptr);
   while(*ptr!=NULL){
      ++ptr;
       }
      --ptr;
for(rev=string; ptr>=rev;){
   if(*ptr == *rev)
       {
        --ptr;
        rev++;
      }
    else
break;
    }

if(rev>ptr) {
   printf("\n\n");
   stringUpr(string);
   printf("\tThe given string %s is Palindrome.",string);
     }
 else {
   printf("\n\n");
   stringUpr(string);
   printf("\tThe given string %s is Not a Palindrome.",string);
}
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
}

void stringLwr(char *s)
{
    int i=0;
    while(s[i]!='\0')
    {
        if(s[i]>='A' && s[i]<='Z'){
            s[i]=s[i]+32;
        }
        ++i;
    }
}
 
void stringUpr(char *s)
{
    int i=0;
    while(s[i]!='\0')
    {
        if(s[i]>='a' && s[i]<='z'){
            s[i]=s[i]-32;
        }
        ++i;
    }
    
}


Average Grade Solver in C Using Pointers

Here is a sample program to solve the average grade of the student using pointers in C.

I am currently accepting programming work, it projects, school 

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.

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



Sample Program Output


Program Listing

/* average_grade.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 26, 2018  Monday  9:07 AM
   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 main()
{
 float solve_average=0.00;
 float prelim=0.00,midterm=0.00,final=0.00;
 float *prelim_p, *midterm_p, *final_p;
 
 printf("\n\n");
 printf("\tAverage Grade Solver");
 printf("\n\n");
 printf("\tGive Prelim Grade   : ");
 scanf("%f",&prelim);
 printf("\tGive Midterm Grade  : ");
 scanf("%f",&midterm);
 printf("\tGive Final Grade    : ");
 scanf("%f",&final);
  
 prelim_p = &prelim;
 midterm_p = &midterm;
 final_p = &final;
  
solve_average =(*prelim_p+*midterm_p+*final_p)/3;
 
printf("\n\n");
printf("\t===== DISPLAY RESULTS =====");
printf("\n\n");
printf("\tThe student average grade is %.2f.",solve_average);
printf("\n\n");
printf("\tEND OF PROGRAM");
printf("\n\n");
}



Addition of Three Numbers in C using Pointers

A program that I wrote for my upcoming book on C programming this program will ask the user to give three numbers and the program will solve the total sum of the three numbers using pointers in C.

I am currently accepting programming work, it projects, school 

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.

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


Sample Program Output


Program Listing

#include <stdio.h>

int main()
{
   int first=0, second=0,third=0; 
   int *a,*b,*c;
   int sum=0;
   printf("\n\n");
   printf("\tAddition of Three Numbers");
   printf("\n\n");
   printf("\tGive Three Numbers : ");
   scanf("%d%d%d",&first,&second,&third);
   a = &first;
   b = &second;
   c = &third;
  sum = *a + *b + *c;
  printf("\n\n");
  printf("\t===== DISPLAY RESULTS =====");
  printf("\n\n");
  printf("\tThe total sum of %d, %d and %d is %d."
          ,first,second,third,sum);
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
 }


Sum and Difference of Two Numbers Using Pointers in C

A simple program that I wrote using C language that will ask the user to give two numbers and then the program will compute the sum and difference of the two numbers using pointers in C.

I am currently accepting programming work, it projects, school 

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.

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


Sample Program Output


Program Listing

/* add_subtract.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 27, 2018  Monday  9:21 PM
   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 main()
{
   int first=0, second=0;; 
   int *a,*b;
   int sum=0;
   int difference=0;
   printf("\n\n");
   printf("\tSum and Difference of Two Numbers");
   printf("\n\n");
   printf("\tGive Two Numbers : ");
   scanf("%d%d",&first,&second);
   a = &first;
   b = &second;
  sum = (*a + *b);
  difference = (*a - *b);
  printf("\n\n");
  printf("\t===== DISPLAY RESULTS =====");
  printf("\n\n");
  printf("\tThe sum of %d and %d is %d."
          ,first,second,sum);
  printf("\n\n");   
  printf("\tThe difference between %d and %d is %d."
          ,first,second,difference);     
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
 }

Tuesday, November 13, 2018

Temperature Converter in C

A simple temperature converter in C that I wrote for my upcoming book in C programming. I hope you will find my work useful currently I am quite busy with my work that why I was not able to update my blog guys.

I am currently accepting programming work, it projects, school 

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.

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


Sample Program Output


Program Listing

#include <stdio.h>

int main() 
 {
   float celsius=0.00,fahrenheit=0.00;
   system("COLOR F0");
   printf("\n\n");
   printf("\tTemperature Converter");
   printf("\n\n");
   printf("\tGive the temperature in Fahrenheit  : ");
   scanf("%f", &fahrenheit);
   
   celsius = (fahrenheit-32) * 5 / 9;
      
   printf("\n\n");
   printf("\tThe temperature in Celsius is %.2f\370C.",celsius);
   printf("\n\n");
   printf("\tEND OF PROGRAM");
   printf("\n\n");
}





Loan Interest Solver in C

In this article, I would like to share with you a simple program that I wrote using C language for my new book that I am working right now I named this program Loan Interest Solver in C to solve the interest rate of the loan of the client. I hope you like my program. Thank you.

I am currently accepting programming work, it projects, school 

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.

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



Sample Program Output

Program Listing


/* interest.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 11, 2018   9:49 PM
   Location : Bacolod City, Negros Occidental
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com
*/

#include <stdio.h>

int main()
{
    float principal=0.00, time=00;
float rate=0.00, solve_interest=0.00;
    
system("COLOR F0");
printf("\n\n");
    printf("\tLoan Interest Solver");
printf("\n\n");
    printf("\tEnter Principal Amount PHP : ");
    scanf("%f",&principal);
    printf("\n");
    printf("\tEnter No. of Years  : ");
    scanf("%f",&time);
    printf("\n");
    printf("\tEnter Percent Rate % : ");
    scanf("%f",&rate);
     
    solve_interest = (principal * time * rate) / 100;

  printf("\n\n");
    printf("\tThe Interest is PHP %.2f.",solve_interest);
    printf("\n\n");
printf("\tEnd of Program"); 
printf("\n\n");
  }





Thursday, November 1, 2018

Addition of Two Numbers Using Two Dimensional Array in C++

In this article I would like to share with you guys how to create a program using C++ to add two numbers using two-dimensional array. 

I am currently accepting programming work, it projects, school 

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.

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



Sample Program Output


Program Listing

// Addition of two numbers using two dimensional array
// November 1, 2018  Thursday
// Author: Mr. Jake R. Pomperada,MAED-IT
// www.jakerpomperada.com
// jakerpomperada@gmail.com
// jakerpomperada@jakerpomperada.com
// Product of Bacolod City, Negros Occidental Philippines

#include <iostream>

using namespace std;

int main()
{
int a[1][1];
char reply;
int sum=0;
do {

cout <<"\n\n";
cout << "Addition of Two Numbers Using Two Dimensional Array in C++";
cout <<"\n\n";
cout << "Enter first number : ";
cin >> a[0][0];
cout <<"Enter second number : ";
cin >> a[0][1];
sum = (a[0][0]) + (a[0][1]);
cout <<"\n\n";
cout << "The total sum is " << sum <<".";
cout <<"\n\n";
cout <<"Do you want to continue? Y/N : ";
cin >> reply;
} while(toupper(reply)=='Y');
cout <<"\n\n";
cout <<"\tEnd of Program";
cout <<"\n\n";
}

Sunday, October 28, 2018

Calling a Stored Procedure in PHP and MySQL

In this article I would like to share with you a code that I wrote to call a stored procedure in PHP and MySQL. I am a beginner in writing store procedures in MySQL using PHP I am still learning on it. I would like to thank my professor Sir Jeffric So Pisuena for teaching us how to create stored procedure in PHP and MySQL.

I am currently accepting programming work, it projects, school 

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.

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






Sample Program Output


Program Listing

<?php
//including the database connection file
include_once("classes/Crud.php");

$crud = new Crud();

//fetching data in descending order (lastest entry first)

// Calling the Stored Procedure display_users()

$query = "CALL display_users()";

//$query = "SELECT * FROM users ORDER BY id DESC";
$result = $crud->getData($query);
//echo '<pre>'; print_r($result); exit;
?>

<html>
<head>
<title>Homepage</title>
</head>

<body>
<a href="add.html">Add New Data</a><br/><br/>

<table width='80%' border=0>

<tr bgcolor='#CCCCCC'>
<td>Name</td>
<td>Age</td>
<td>Email</td>
<td>Update</td>
</tr>
<?php 
foreach ($result as $key => $res) {
//while($res = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>".$res['name']."</td>";
echo "<td>".$res['age']."</td>";
echo "<td>".$res['email']."</td>";
echo "<td><a href=\"edit.php?id=$res[id]\">Edit</a> | <a href=\"delete.php?id=$res[id]\" onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>";
}
?>
</table>
</body>
</html>



Sunday, October 21, 2018

Two Dimensional Array in Turbo Pascal

Here is a sample program that I wrote using Turbo Pascal For Windows to show how two dimensional array works in Pascal programming language. The code is very simple and short very easy to understand.


I am currently accepting programming work, it projects, school 

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.

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




Sample Program Output


Program Listing

two.pas


 program two_dimensional_array;

 uses WinCrt;

var 

   a: array [0..10, 0..10] of integer;

   i,j : integer;  

begin
   writeln;
   write('        Two Dimensional Array in Turbo Pascal');
   writeln;
   writeln;
   write('      Created By Mr. Jake R. Pomperada,MAED-IT');
   writeln;
   writeln;
   for i:=0 to 10 do
      for j:=0 to 10 do
         a[i,j]:= i * j;  
   
   for i:=0 to 10 do
   begin  
      for j:=0 to 10 do
         write(a[i,j]:4,' ');  
      writeln;  
   end;
   writeln;
   write('            End of Program');
   writeln;
end.