Tuesday, July 10, 2018

Linear search in a unsorted array in C

Here is a simple program in C that I would like to share with you guys a linear search in a unsorted array. The code is very simple and shows how to use C language in Linear Searching.

I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.



Program Listing

linear.c

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

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

clrscr( ) ;

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

for ( i = 0 ; i <= 9 ; i++ )
{
if ( arr[i] == num )
break ;
}

if ( i == 10 )
printf ( "Number is not present in the array." ) ;
else
printf ( "The number is at position %d in the array.", i ) ;

getch( ) ;
}

Linear search in a sorted array in C

Here is a simple program in C that I would like to share with you guys a linear search in a sorted array. The code is very simple and shows how to use C language in Linear Searching.

I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.



Program Listing

linear.c

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

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

clrscr( ) ;

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

for ( i = 0 ; i <= 9 ; i++ )
{
if ( arr[9] < num || arr[i] >= num )
{
if ( arr[i] == num )
printf ( "The number is at position %d in the array.", i ) ;
else
printf ( "Number is not present in the array." ) ;
break ;
}
}

getch( ) ;
}

Sunday, July 8, 2018

Simple Product Information System in C++

A very simple program that I wrote using C++ to demonstrate the use of setprecision function in iomanip library of C++ and to show very basic inventory system written in C++ I use this example in my C++ programming class here in my hometown in Bacolod City, Negros Occidental Philippines. What does the program will do is to ask the user the product name, individual product cost, quantity of the product and then our program will compute the total cost of the product.

I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.




Sample Program Output



Program Listing

inventory.cpp


#include <iostream>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main()
{
string product;
float price=0.00;
int quantity=0;
float total_cost=0.00;
cout << "Simple Product Information System";
cout << "\n\n";
setprecision(2);
cout << "Give Product Name : ";
getline(cin,product);
cout << "Product Price : ";
cin >> price;
cout << "Product Quantity : ";
cin >> quantity;
total_cost = (price * quantity);
cout << "\n\n";
cout << "===== Display Report =====";
cout << "\n\n";
cout << "Product Name   :     " << product << "\n";
cout << "Product Price  : PHP " << price << "\n";
cout << "Quantity       :     " << quantity << "\n";
cout << "\n\n";
cout << "Total Cost     : PHP " << total_cost;
cout << "\n\n";
cout << "End of Program";
cout << "\n\n";
system("pause");
}





Sunday, July 1, 2018

Addition and Product of Two Numbers in C++

In this article I would like to share with you a programming activity that I prepare to my students in my class in computer programming 1 teaching c++ to find the sum and product of two numbers and allows the user to re run again the program. I am using Dev C++ in writing this program I hope you will find my work useful.

I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.




Sample Program Output


Program Listing

add_product.cpp


#include <iostream>
#include <stdlib.h>

using namespace std;


int main()
{
int a,b,sum,product;
char reply;
do {
system("cls");
cout <<"\tAddition and Product of Two Numbers in C++";
cout << "\n\n";
cout << "\t Created By Mr. Jake R. Pomperada, MAED-IT";
cout << "\n\n";
cout << "Enter First Value  : ";
cin >> a;
cout << "Enter Second Value : ";
cin >> b;
sum = (a+b);
product = (a * b);
cout << "\n\n";
cout <<"The sum of " << a << " and " << b << " is " << sum << ".";
cout << "\n\n";
cout <<"The product of " << a << " and " << b << " is " << product << ".";
cout << "\n\n";
cout << "Do you want to quit? [Y] for YES  and  [N] for NO : ";
    cin >> reply;
}  while (reply == 'n' || reply == 'N');
   cout << "\n\n";
   cout << "\t Thank you for using this software";
   cout <<"\n\n";
   cout << "\t End of Program";
   cout << "\n\n";
}





Friday, June 29, 2018

Greeter in LISP

A simple program to ask the user to give user name and then our program will greet the user using LISP as our programming language.

I am using Common LISP is open source and free to download in the Internet.

You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.


Sample Program Output


Program Listing

greeter.lisp

(defun Greeter()
   (terpri)
   (format t "Greeter in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "What is your name?  ")
   (setq user_name (read))
   (format t "~%")
   (format t "Hello ~s How are you today?  " user_name)
   (format t "~%~%")
   (format t "End of Program")
)
(Greeter)

Product of Two Numbers in LISP


Here is a simple program that I wrote using Common LISP that will ask the user to give two numbers and then our program will compute the product of the two numbers being provided by our user. I am using Common LISP is open source and free to download in the Internet.


You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.



Sample Program Output


product.lisp

(defun Product()
   (terpri)
   (format t "Product of Two Numbers in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter First Value :  ")
   (setq a (read))
   (princ "Enter Second Value :  ")
   (setq b (read))
   (setq product (* a b))
   (format t "~%~%")
   (format t "The product is ~D." product)
   (format t "~%~%")
   (format t "End of Program")
)
(Product)


Addition of Two Numbers in LISP

Here is a simple program that I wrote using Common LISP that will ask the user to give two numbers and then our program will compute the sum of the two numbers being provided by our user. I am using Common LISP is open source and free to download in the Internet.

You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.


Sample Program Output


add.lisp

(defun Addition()
   (terpri)
   (format t "Addition of Two Numbers in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter First Value :  ")
   (setq a (read))
   (princ "Enter Second Value :  ")
   (setq b (read))
   (setq total_sum (+ a b))
   (format t "~%~%")
   (format t "The Total Sum is ~D." total_sum)
   (format t "~%~%")
   (format t "End of Program")
)
(Addition)


Area of the Circle Solver in LISP

A very simple program that I will ask the user to give the radius of the circle and then our program will compute the it's are using LISP as our programming language.

I am currently accepting programming work, it project, 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 in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.


Sample Program Output


area.lisp

(defun AreaOfCircle()
   (terpri)
   (format t "Area of the Circle Solver ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter Radius: ")
   (setq radius (read))
   (setq area (* 3.1416 radius radius))
   (format t "The Radius is = ~F~%The Area is ~F" radius area)
   (format t "~%~%")
   (format t "End of Program")
)
(AreaOfCircle)


Tuesday, June 26, 2018

Centimeter To Feet Converter in PHP

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into feet equivalent using PHP as our programming language.  I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.


Sample Program Output


Program Listing

fee.php

<?php

function ConversionToFeet($centi)
{
    $feet = 0.0328 * $centi;
    
    echo("<h2> Feet (s) equivalent is " . $feet . ".</h2>\n");
}


$centi = 100;

echo "<style> body { font-family:arial; size:12px } </style>";
echo "<h2> Centimeter To Feet Converter in PHP </h2>";
echo "<h3> Written By Mr. Jake Rodriguez Pomperada, MAED-IT </h3>";
ConversionToFeet($centi);
echo "<h2> End of Program </h2>";

?>



Centimeter To Inches Converter in PHP

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into inches equivalent using PHP as our programming language.  I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.



Sample Program Output


Program Listing

index.php


<?php

function ConversionToInches($centi)
{
    $inch = 0.3937 * $centi;
    
    echo("<h2> Inches equivalent is " . $inch . "</h2>\n");
}


$centi = 100;

echo "<style> body { font-family:arial; size:12px } </style>";
echo "<h2> Centimeter To Inches Converter in PHP </h2>";
echo "<h3> Written By Mr. Jake Rodriguez Pomperada, MAED-IT </h3>";
ConversionToInches($centi);
echo "<h2> End of Program </h2>";

?>




Centimeter To Inches Converter in Pascal

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into inches equivalent using Pascal as our programming language. I am using Free Pascal as both my compiler and IDE this is open source project that is free to download and use from the Internet. I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. 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 Philippines is  +63 (034) 4335675.





Sample Program Output


Program Listing

cmtoinches.pas

Program CM_Inches;
Uses Crt;
Const
   inch = 0.3937;
Var
   cm : real;
   solve : real;
Begin
  Clrscr;
  Writeln;
  Writeln('Centimeter To Inches Converter in Pascal');
  Writeln;
  Write('Written By Mr. Jake R. Pomperada,MAED-IT ');
  Writeln;
  Writeln;
  Write('Give the value in Centimeter? ');
  Readln(cm);

  solve := (cm * inch);

  Writeln;
  write('The equivalent value of ' ,cm:5:2, ' Centimeter (s) in Inches is ' ,solve:5:2,' Inche (s) .');
  writeln;
  Writeln;
  write('End of Program');
  writeln;
  Readln;
End.