Friday, April 7, 2017

Sum of All Odd Numbers in Visual Basic NET

Hi there in this article I would like to share with you a sample program that will ask the user to give a number and then our program will compute the total sum of all the odd numbers in the given number value by our user using Visual Basic NET. The code is very simple and easy to understand. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.
 
 
 





Sample Program Output


Program Listing

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim sum As Integer
        If Val(TextBox1.Text) < 0 Then
            MsgBox("Invalid value !!! Try Again", vbCritical)
        Else
            For a = 1 To Val(TextBox1.Text) Step 2
                sum = sum + a
            Next a
            Label2.Text = "The sum of all odd numbers from 1 to " & TextBox1.Text & ": " & sum & "."
        End If
    End Sub

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

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


Tuesday, April 4, 2017

Power of a Number in Visual Basic NET

Here is a sample program that will ask the user to give the base and exponent value and then our program will compute the power value of the given base and exponent number by our user using Microsoft Visual Basic NET as our programming language.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Sample Program Output

Program Listing

Public Class Form1

    Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

    End Sub

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

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim base, exponent, compute As Integer

        base = Val(TextBox1.Text)
        exponent = Val(TextBox2.Text)

        compute = Math.Pow(base, exponent)
       
        Label5.Text = "The power value is  " & compute & "."
    End Sub

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



Square Root Solver in Visual Basic NET

Hi there in this article I would like to share with you a sample program that will ask the user to give a number in integer value and then our program will convert the square root equivalent of the given number by our user. The code is very easy to understand written in Visual Basic NET. I am using Visual Studio 2013 as my programming tool in this sample program. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.







Sample Program Output


Program Listing


Public Class Form1

    Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

    End Sub

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

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a, sqr_convert As Integer

        a = Val(TextBox1.Text)
        sqr_convert = Math.Sqrt(a)
        Label3.Text = "The square root equivalent of " & a & " is " & sqr_convert & "."
    End Sub

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



Monday, April 3, 2017

Addition of Two Numbers in Visual Basic 6

A very simple program that I wrote in Visual Basic 6 to ask the user to give two numbers and then our program will compute for the total sum of the two numbers. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Sample Program Output

Program Listing

Private Sub Command1_Click()

Dim sum, val_1, val_2 As Integer

val_1 = Val(Text1.Text)
val_2 = Val(Text2.Text)

sum = (val_1 + val_2)

Label3.Caption = "The sum of " & val_1 & " and " & val_2 & " is " & sum & "."
End Sub

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

End Sub

Private Sub Command3_Click()
End

End Sub


Thursday, March 30, 2017

Old Age Checker in C++

A very simple program that I wrote in C++ way back in 2010 in my C++ programming class in college to check if the user is old enough I am using array as my data structure and if conditional statement in C++.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.


Program Listing

#include <iostream>
#include <iomanip>


using namespace std;


struct item {

    string name[2];
    int age[2];
};

  main()
    {
      item child;
      cout << "\t\t Determine Old Age ";
      cout << "\n\n";

        for (int x=0; x<2; x++) {
            cin.ignore();
            cout << "\nEnter the Child's Name : ";
            getline(cin,child.name[x]);
            cout << "\nEnter the Child's Age  : ";
            cin >> child.age[x];
        }

             cout << "\n\n";
               if (child.age[0] > child.age[1]) {
                    cout << "\n\n";
                   cout << child.name[0] << " is much older compared to "
                    << child.name[1];

               }
               else {
                      cout << "\n\n";
                    cout << child.name[1] << " is much older compared to "
                    << child.name[0];
               }

             cout << "\n\n";
             system("pause");
           }

Product Costing Calculator in C++

A very simple program that I wrote using C++ to solve the product cost this program is very useful in business day to day operations. I am using CodeBlocks as my text editor and Dev C++ as my C++ compiler in this sample program. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Program Listing

#include <iostream>
#include <iomanip>


using namespace std;


struct item {

    string name,type;
    int quantity;
    float price;
};

main() {
     item product;
     float solve=0.00;
     cout << "\n\tProduct Description 1.0";
     cout << "\n\n";
     cout << "Enter Product Name         : ";
     getline(cin,product.name);
     cout << "Enter Product Description  : ";
     getline(cin,product.type);
     cout << "Enter Product Quantity     : ";
     cin >> product.quantity;
     cout << "Enter Product Price/Pcs    : ";
     cin >> product.price;

     solve = (product.quantity * product.price);

     cout << fixed << setprecision(2);

     cout << "\n  === Report ===";
     cout << "\n\n";
     cout << "\nProduct Name   : " << product.name;
     cout << "\nProduct Type   : " << product.type;
     cout << "\nQuantity       : " << product.quantity;
     cout << "\nPrice          : " << product.price;
     cout << "\n\n Total Cost  : $ " << solve;
     cout << "\n\n";
     system("pause");
}


Subtraction of Two Numbers in Turbo Pascal

A  very simple program that I wrote using Pascal to ask the user to give two numbers and then our program will find the difference between the two numbers based on the user given numbers. The code is very easy to understand and use. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing

{Date : March 30, 2017    Thursday            }
{Metro Manila, Philippines                  }
{jakerpomperada@yahoo.com and jakerpomperada@gmail.com }

Program subtract_numbers;

Uses WinCrt;

var a,b,difference : integer;

Begin
clrscr;
a:=0;
b:=0;
difference := 0;
 writeln;
 Writeln;
 writeln('SUBTRACTION OF TWO NUMBERS IN PASCAL');
 writeln;
 write('Give first number : ');
 readln(a);
 write('Give second number : ');
 readln(b);

 difference := (a-b);
 writeln;
 write('The difference between ' ,a, ' and ' ,b,' is ' ,difference,'.');
 writeln;
 Writeln;
 writeln('END OF PROGRAM');
readln;
End.


Swapping of Two Numbers in Turbo Pascal

In this article I would like to share with you guys a program that I wrote using Turbo Pascal our program will ask the user to give two numbers and then it will swap the arrangement of the two numbers given by our user. The program uses Turbo Pascal for Windows as our Pascal compiler. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output



Program Listing

Program swap_numbers;

Uses WinCrt;

var a,b,temp : integer;

Begin
clrscr;
 writeln;
 Writeln;
 writeln('SWAPPING OF TWO NUMBERS IN PASCAL');
 writeln;
 write('Give first number : ');
 readln(a);
 write('Give second number : ');
 readln(b);
 writeln;
 write('Before Swapping : A = ',a, ' and B = ',b);
 writeln;

  temp := a;
  a:=b;
  b:=temp;

 writeln;
 writeln;
 write('After Swapping : A = ',a, ' and B = ',b);
 writeln;
 Writeln;
 writeln('END OF PROGRAM');
readln;

End.



Hello World in Turbo Pascal

Here is a very simple program that I wrote using Turbo Pascal to display a message Hello World on the screen of your computer. Most of the first programming examples when teaching computer programming is to display a message on the screen. Hello World is the most common given examples to the students. I am using Turbo Pascal for Windows in this sample program of ours. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

{Date : March 30, 2017    Thursday            }
{Metro Manila, Philippines                  }
{jakerpomperada@yahoo.com and jakerpomperada@gmail.com }

Program hello_world;

Uses WinCrt;

Begin
clrscr;
 writeln;
 Writeln;
 writeln('HELLO WORLD !!! ');
 writeln;
 Writeln;
 writeln('END OF PROGRAM');
readln;
End.




Hong Kong Style Noodles Bacolod Branch


Hi there this is article is not related to programming I would like to market our new business which will be open in April 1, 2017 at Lopues Mandalagan Bacolod City. The name of our business is Hong Kong Style Noodle and Dimsun we sell authentic Chinese noodles and Dim sum at very affordable price with excellent taste because you are the one who will mix you own sauce that match to your taste buds.








It is located at the grocery entrance section of Lopues Department Store in Barangay Mandalagan, Bacolod City, Negros Occidental Philippines.   For order you can call or text this number 0917 - 701 - 0825 or telephone number (034) 433 - 5675 look for Mrs. Allie Pomperada.

Thank you very much.


While Loop Statement in Turbo Pascal

In this article I would like to share with you a sample program to demonstrate how to use while loop statement using Pascal as our programming language. I am using Turbo Pascal For Windows as my Pascal compiler in this sample program. What does the program will do is to display a series of number from 1 to 20. I hope you will learn something in this simple program that I wrote. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

{Written By: Mr. Jake R. Pomperada, MAED-IT }
{Date : March 30, 2017    Thursday            }
{Metro Manila, Philippines                  }
{jakerpomperada@yahoo.com and jakerpomperada@gmail.com }

Program while_loop;

Uses WinCrt;

Var a : Integer;

Begin
clrscr;
 a := 1;

 writeln;
 Writeln;
 writeln('WHILE LOOP STATEMENT IN PASCAL');
 writeln;
   While (a<=20) Do
     Begin
       Write(' ',a,' ');
       a := a + 1;
     End;

 writeln;
 Writeln;
 writeln('END OF PROGRAM');
readln;
End.



Tuesday, March 28, 2017

While Loop in C

Hi there in this article I will show you how to use While loop statement using C language. Looping statements is very important in any programming language it allows us to repeat a certain command in our program. What does the program will display a series of numbers from 1 to 10. The code is very easy to understand and use. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Sample Program Output

Program Listing

#include <stdio.h>

int main()
{
    int a=1;

    printf("\n\n");
    printf("\tWHILE LOOP STATEMENT IN C");
    printf("\n\n");

    while (a<=10) {
        printf("Loop Iteration No. %d  ",a);
        printf("\n");
    a++;
    }
    printf("\n\n");
    printf("End of Program");
    printf("\n\n");
}




Thursday, March 23, 2017

Legal Age Checker in Turbo Pascal

Here is a simple program that will check if the given age of the user is already legal or  not let us assume the legal is 18 years old it uses if else statement in Pascal to check. The code is very easy to understand and use. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

{Written By: Mr. Jake R. Pomperada, MAED-IT }
{Date : March 23, 2017    Thursday            }
{Metro Manila, Philippines                  }
{jakerpomperada@yahoo.com and jakerpomperada@gmail.com }

Program legal_age_checker;

Uses WinCrt;

Var Age : Integer;

Begin
clrscr;
 Age := 0;

 writeln('LEGAL AGE CHECKER IN PASCAL');
 writeln;
 Write('Enter Your Age : ');
 Readln(Age);

   If (Age>=18) then
   Begin
     Writeln;
     Write('You are already an Adult at the age of ',age,'.');
   End
  Else
    Begin
        Writeln;
        Write('You are still a Minor at the age of ',age,'.');
    End;
 writeln;
 writeln;
 Writeln;
 writeln('  END OF PROGRAM  ');
readln;
End.

Odd and Even Number Checker in Turbo Pascal

Here is a sample program that will ask the user to give a number and then our program will determine if the given number is an odd or even number using Pascal as our programming language. I am using Turbo Pascal for Windows in this sample program. Thank you.


My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

{ Written By: Mr. Jake R. Pomperada, MAED-IT                           }
{ Date : March 23, 2017    Thursday                                               }
{ Metro Manila, Philippines                                                              }
{ jakerpomperada@yahoo.com and jakerpomperada@gmail.com }

Program even_odd_numbers;

Uses WinCrt;

Var N, R : Integer;

Begin
clrscr;
 N := 0;
 R := 0;

 writeln('EVEN AND ODD NUMBER CHECKER IN PASCAL');
 writeln;
 Write('Give a Number : ');
 Readln(N);
 R := (N MOD 2);
   if (R=0) then
   Begin
     Writeln;
     Write('The given number ' ,n,' is EVEN number.');
   End
  Else
    Begin
        Writeln;
        Write('The given number ' ,n,' is ODD number.');
    End;
 writeln;
 writeln;
 Writeln;
 writeln('  END OF PROGRAM  ');
readln;
End.