Saturday, October 28, 2017

Fare Solver in Turbo Pascal

In this article I would like to share with you a very simple program that I wrote a very long time ago in Turbo Pascal to compute the fare of the 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.



Program Listing

program proj;
uses crt;
var i : integer;

procedure pass;
var
   status:string;
      name,dest,acc:string[30];
      date:integer;

  begin
   {repeat}
   writeln('Fare Solver in Turbo Pascal');
   writeln('Name');
   readln(name);
   writeln('Status');
   read(status);
   writeln('Destination');
   readln(dest);
   writeln('Date');
   readln(date);
   writeln('Accomodation');
   readln(acc);
   Case status of
   begin
    'student': begin
               if acc == 'Cabin' then
                 begin
                  if dest == 'Manila' then
                    pay = 1500.00 * .2
                   else if dest = 'Cebu' then
                    pay = 1000.00 * .2
                   else if dest = 'Cagayan' then
                    pay = 2000.00 * .2
                   if dest == 'Davao' then
                    pay = 1800.00 * .2
                   else if dest = 'Zamboanga' then
                    pay = 2500.00 * .2
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .2
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc ='Tourist' then
                    begin
                  if dest == 'Manila' then
                    pay = 1200.00 * .2
                   else if dest = 'Cebu' then
                    pay = 800.00 * .2
                   else if dest = 'Cagayan' then
                    pay = 1500.00 * .2
                   if dest == 'Davao' then
                    pay = 1600.00 * .2
                   else if dest = 'Zamboanga' then
                    pay = 2000.00 * .2
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .2
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
               else if acc == 'Tatami' then
                 begin
                  if dest == 'Manila' then
                    pay = 1000.00 * .2
                   else if dest = 'Cebu' then
                    pay =500.00 * .2
                   else if dest = 'Cagayan' then
                    pay = 1100.00 * .2
                   if dest == 'Davao' then
                    pay = 1300.00 * .2
                   else if dest = 'Zamboanga' then
                    pay = 1500.00 * .2
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .2
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc = 'Econom' then
                    begin
                  if dest == 'Manila' then
                    pay = 800.00 * .2
                   else if dest = 'Cebu' then
                    pay = 300.00 * .2
                   else if dest = 'Cagayan' then
                    pay = 900.00 * .2
                   if dest == 'Davao' then
                    pay = 1000.00 * .2
                   else if dest = 'Zamboanga' then
                    pay = 1000.00 * .2
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .2
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
    'child': begin
               if acc == 'Cabin' then
                 begin
                  if dest == 'Manila' then
                    pay = 1500.00 * .5
                   else if dest = 'Cebu' then
                    pay = 1000.00 * .5
                   else if dest = 'Cagayan' then
                    pay = 2000.00 * .5
                   if dest == 'Davao' then
                    pay = 1800.00 * .5
                   else if dest = 'Zamboanga' then
                    pay = 2500.00 * .5
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .5
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc ='Tourist' then
                    begin
                  if dest == 'Manila' then
                    pay = 1200.00 * .5
                   else if dest = 'Cebu' then
                    pay = 800.00 * .5
                   else if dest = 'Cagayan' then
                    pay = 1500.00 * .5
                   if dest == 'Davao' then
                    pay = 1600.00 * .5
                   else if dest = 'Zamboanga' then
                    pay = 2000.00 * .5
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .5
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
               else if acc == 'Tatami' then
                 begin
                  if dest == 'Manila' then
                    pay = 1000.00 * .5
                   else if dest = 'Cebu' then
                    pay =500.00 * .5
                   else if dest = 'Cagayan' then
                    pay = 1100.00 * .5
                   if dest == 'Davao' then
                    pay = 1300.00 * .5
                   else if dest = 'Zamboanga' then
                    pay = 1500.00 * .5
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .5
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc = 'Econom' then
                    begin
                  if dest == 'Manila' then
                    pay = 800.00 * .5
                   else if dest = 'Cebu' then
                    pay = 300.00 * .5
                   else if dest = 'Cagayan' then
                    pay = 900.00 * .5
                   if dest == 'Davao' then
                    pay = 1000.00 * .5
                   else if dest = 'Zamboanga' then
                    pay = 1000.00 * .5
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .5
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
     'Senior': begin
               if acc == 'Cabin' then
                 begin
                  if dest == 'Manila' then
                    pay = 1500.00 * .3
                   else if dest = 'Cebu' then
                    pay = 1000.00 * .3
                   else if dest = 'Cagayan' then
                    pay = 2000.00 * .3
                   if dest == 'Davao' then
                    pay = 1800.00 * .3
                   else if dest = 'Zamboanga' then
                    pay = 2500.00 * .3
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .3
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc ='Tourist' then
                    begin
                  if dest == 'Manila' then
                    pay = 1200.00 * .3
                   else if dest = 'Cebu' then
                    pay = 800.00 * .3
                   else if dest = 'Cagayan' then
                    pay = 1500.00 * .3
                   if dest == 'Davao' then
                    pay = 1600.00 * .3
                   else if dest = 'Zamboanga' then
                    pay = 2000.00 * .3
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .3
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
               else if acc == 'Tatami' then
                 begin
                  if dest == 'Manila' then
                    pay = 1000.00 * .3
                   else if dest = 'Cebu' then
                    pay =500.00 * .3
                   else if dest = 'Cagayan' then
                    pay = 1100.00 * .3
                   if dest == 'Davao' then
                    pay = 1300.00 * .3
                   else if dest = 'Zamboanga' then
                    pay = 1500.00 * .3
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .3
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc = 'Econom' then
                    begin
                  if dest == 'Manila' then
                    pay = 800.00 * .3
                   else if dest = 'Cebu' then
                    pay = 300.00 * .3
                   else if dest = 'Cagayan' then
                    pay = 900.00 * .3
                   if dest == 'Davao' then
                    pay = 1000.00 * .3
                   else if dest = 'Zamboanga' then
                    pay = 1000.00 * .3
                   else if dest = 'Iloilo' then
                    pay = 300.00 * .3
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
       'Regular': begin
               if acc == 'Cabin' then
                 begin
                  if dest == 'Manila' then
                    pay = 1500.00
                   else if dest = 'Cebu' then
                    pay = 1000.00
                   else if dest = 'Cagayan' then
                    pay = 2000.00
                   if dest == 'Davao' then
                    pay = 1800.00
                   else if dest = 'Zamboanga' then
                    pay = 2500.00
                   else if dest = 'Iloilo' then
                    pay = 300.00
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc ='Tourist' then
                    begin
                  if dest == 'Manila' then
                    pay = 1200.00
                   else if dest = 'Cebu' then
                    pay = 800.00
                   else if dest = 'Cagayan' then
                    pay = 1500.00
                   if dest == 'Davao' then
                    pay = 1600.00
                   else if dest = 'Zamboanga' then
                    pay = 2000.00
                   else if dest = 'Iloilo' then
                    pay = 300.00
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
               else if acc == 'Tatami' then
                 begin
                  if dest == 'Manila' then
                    pay = 1000.00
                   else if dest = 'Cebu' then
                    pay =500.00
                   else if dest = 'Cagayan' then
                    pay = 1100.00
                   if dest == 'Davao' then
                    pay = 1300.00
                   else if dest = 'Zamboanga' then
                    pay = 1500.00
                   else if dest = 'Iloilo' then
                    pay = 300.00
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
                else if acc = 'Econom' then
                    begin
                  if dest == 'Manila' then
                    pay = 800.00
                   else if dest = 'Cebu' then
                    pay = 300.00
                   else if dest = 'Cagayan' then
                    pay = 900.00
                   if dest == 'Davao' then
                    pay = 1000.00
                   else if dest = 'Zamboanga' then
                    pay = 1000.00
                   else if dest = 'Iloilo' then
                    pay = 300.00
                   else
                    writeln (' NOT IN SERVICE ')
                  end;
          writeln('Total Payable:', pay);
          readln
          end;
    end;
   { until keypressed == chr(27);}
 {main}
  begin
   pass;
   readln;
  end.

Password in Turbo Pascal

Here is a very old code that I wrote during my college day using Turbo Pascal as my programming language it is a password program. The code is very simple and 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.


Program Listing

Program  password;
uses crt;
var
w,i:integer;
pass,a:string[12];
try:char;
name:string;
begin
repeat
 randomize;
 textbackground(black);
 clrscr;
 gotoxy(32,6);
 write('P A S S W O R D');
 gotoxy(27,7); write('旼컴컴컴컴컴컴컴컴컴컴컴커');
 gotoxy(27,8); write('?                       ?);
 gotoxy(27,9); write('읕컴컴컴컴컴컴컴컴컴컴컴켸');
 textcolor(black);
 gotoxy(29,8);readln(pass);
 textcolor(white);
 gotoxy(20,12); write('Verifying password ');
  for i:=40 to 60 do
  begin
    gotoxy(i,12);
    sound(random(1000+i));

    write('');
    delay(7000);
  end;
 if pass = 'admin' then
  begin
   clrscr;
   gotoxy(12,20);
   write(' You are one of the authorized person(s) ');
  end;
  nosound;
 if pass <> 'admin' then
  begin
   clrscr;
   gotoxy(31,12);  write('Wrong Password');
   gotoxy(25,14);write('Do you want another try Y/N : ');
  end;
  nosound;
   readln(try);
until (try = 'N') or (try = 'n');
readln;
end.
  

College Year Level Checker Using Visual Basic NET

In this article I would like to share with you a simple program that I wrote using Visual Basic NET to ask the user to give the year level of the students using if else statement in Visual Basic NET. I hope you will find my work useful.

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


Public Class Form1

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox1.Focus()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim year_level As String
        Dim value_level As Integer

        year_level = TextBox1.Text
        value_level = Int32.Parse(year_level)

        If value_level = 1 Then
            MessageBox.Show("You care belong to Freshmen.")
        ElseIf value_level = 2 Then
            MessageBox.Show("You are belong to Sophomore.")
        ElseIf value_level = 3 Then
            MessageBox.Show("You are belong to Juniors.")
        ElseIf value_level = 4 Then
            MessageBox.Show("You are belong to Seniors.")
        Else
            MessageBox.Show("Invalid Year Level Please Try Again.")
        End If
    End Sub
End Class




Thursday, October 26, 2017

Area of the Triangle Solver in C++

A very simple program that I wrote using C++ to compute the area of the triangle based on the given base and height value of our user. The code is very easy to understand and use. I hope you will like it.

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

area.cpp


// Area of the Triangle Solver in C++
// Author   : Mr. Jake R. Pomperada, MAED-IT
// Date     : October 26, 2017
// Language : C++
// Place    : Bacolod City, Negros Occidental Philippines
// Tools    : CodeBlocks


#include <iostream>
#include <iomanip>

using namespace std;

int main()
{

    int height=0,base=0;
    float area;

    cout << "===================================";
    cout << "\n";
    cout << "Area of the Triangle Solver in C++";
    cout << "\n";
    cout << "===================================";
    cout << "\n\n";
    cout << "Give the height : ";
    cin >> height;
    cout << "Give the base   : ";
    cin >> base;
    area = (height * base) /2;
    cout << "\n\n";
    cout << fixed << showpoint;
    cout << setprecision(2);
    cout << " The area of the triangle is  " << area << ".";
    cout << "\n\n";
    cout << "===== End of the Program =====";
    cout << "\n\n";
}



Saturday, October 21, 2017

Product Discount System in Visual Basic NET

I this article I would like to share with you a sample program that I wrote using Visual Basic NET to compute the discount of the product. The code is very easy to understand and learn.

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

Public Class Form1

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        End
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim solve, final_solve, orig_price, discount As Double

        orig_price = Convert.ToDecimal(TextBox2.Text)

        discount = Convert.ToDecimal(TextBox3.Text) / 100

        solve = orig_price * discount

        final_solve = (orig_price - solve)

        TextBox4.Text = "Php " & Format(final_solve, "0.00")
    End Sub
End Class




Hong Kong Style Noodles and Dimsum Inventory System

A very simple inventory system that I wrote for Hong Kong Style Noodles and Dimsum a local business here in Bacolod City to monitor the daily business transaction of products in the company. I am using Turbo Pascal For Windows in this program.

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

inventory.pas

{ Written By Mr. Jake R. Pomperada, MAED-IT }
{ Date : October 21, 2017                   }
{ Eroreco Subdivision, Bacolod City, Negros Occidental Philippines }

Program Inventory;
Uses WinCrt;
Var

Product,Date : String;
In_day, End_Day, Balance : Integer;

Begin
   Write('Hong Kong Style Noodles and Dimsum Inventory System');
   Writeln;
   Writeln;
   Write('Date       : ');
   Readln(date);
   Write('Product    :  ');
   Readln(product);
   Write('In of Day  :  ');
   Readln(In_day);
   Write('End of Day :  ');
   Readln(End_Day);

   writeln;
   writeln('Daily Report ');
   writeln;
   write('Product    : ' ,product);
   writeln;
   write('Date       : ' ,date);
   writeln;
   writeln;
   balance := (In_day-End_Day);
   Write('Balance    :  ', balance);
   Readln;
End.