Categories
C++

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

I wrote this simple program to ask the user to give two numbers and then the program will solve the sum of two numbers using two-dimensional arrays in C++ programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, 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.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

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";
}
Categories
C++

Automatic Teller Machine Simulation in C++

A simple program that I wrote using a C++ programming language to simulate the Automatic Teller Machine operation.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, 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.
Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Sample Program Output
#include <iostream>

// Created By Mr. Jake R. Pomperada, MAED-IT
// C++   October 19, 2018
// www.jakerpomperada.com

using namespace std;


int main()

{
		int bill500=0, bill200=0, bill100=0, total_balance=0;
		int withdraw=0, money_left=0;
		int reciv500=0, reciv200=0, reciv100=0;
		char withdraw_again[2] = "N";
		 
		 system("COLOR F0");  
	     cout <<"\n\n";
         cout <<"\t Automatic Teller Machine Simulation in C++";
		 cout <<"\n\n";
		 cout <<"\tHow many P500 bills: ";
		 cin >>bill500;
		 cout <<"\tHow many PHP 200 bills: ";
		 cin >>bill200;
		 cout <<"\tHow many PHP 100 bills: ";
		 cin >> bill100;
		 total_balance = 	(bill500 * 500 + (bill200 * 200 +  (bill100 * 100)) );

		 cout <<"\tTotal Balance: PHP :" << total_balance;

	 do

	 {
		 cout <<"\n";
		 cout <<"\n";

		 cout <<"\tEnter amount to withdraw: PHP ";
		 cin >>withdraw;
		 money_left = withdraw ;

		 if  (withdraw > total_balance)
				{
				cout <<"\tWithdraw amount greater than total balance.  ";
				cout <<"\n";
				}
		 if (withdraw < total_balance)
		 {
		 if  (money_left >= 500) 
				{
				 reciv500 = int(money_left / 500);
				 if (reciv500 > bill500)  reciv500 = bill500;

				 money_left = money_left - (reciv500 * 500);
				 bill500 = bill500 - reciv500;
				}

		 if (money_left >= 200) 
			 {
				 reciv200 = int(money_left / 200);
				 if (reciv200 > bill200)  reciv200 = bill200;
				 money_left = money_left - (reciv200 * 200);
				 bill200 = bill200 - reciv200;
			 }

		 if (money_left >= 100) 
			  {
				 reciv100 = int(money_left / 100);
				 if (reciv100 > bill100)  reciv100 = bill100;
				 money_left = money_left - (reciv100 * 100);
				 bill100 = bill100 - reciv100;
				}

				cout <<"\n";
				cout <<"\n";
				cout <<"\tYou will receive:";
				cout <<"\n";
				cout <<"\t  PHP 500 bill : " << reciv500;
				cout <<"\n";
				cout <<"\t  PHP 200 bill : " << reciv200;
				cout <<"\n";
				cout <<"\t  PHP 100 bill : " << reciv100;
				cout <<"\n";


				total_balance = total_balance - withdraw;

				cout <<"\tYour current balance is: PHP " <<total_balance;
				cout <<"\n";
				cout <<"\n";
				cout <<"\tYou only have balance of:";
				cout <<"\n";
				cout <<"\t PHP 500 bill   : "  << bill500;
				cout <<"\n";
				cout <<"\t  PHP 200 bill  : " << bill200;
				cout <<"\n";
				cout <<"\t  PHP 100 bill  : " << bill100;
				cout <<"\n"; 
 				cout <<"\n\n";
				cout <<"\tAnother Withdraw Again ? Y/N : ";
				cin >>withdraw_again;

		 }

	 }  while (withdraw_again == "Y" || withdraw_again == "y");
     cout <<"\n\n";
     cout <<"\tEnd of Program";
     cout <<"\n\n";
}

Categories
C++

ASCII Value of a Character in C++

I wrote this simple program to ask the user to give any character and then the program will convert the given character into an ASCII value using C++ as my programming language. ASCII stands for American Standard Code For Information Interchange.

I am currently accepting programming work, IT projects, school and application development, 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.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
#include<iostream>

using namespace std;

int main()
{
	char ch;
	
	cout <<"\n\n";
	cout <<"\tASCII Value of a Character in C++";
	 cout <<"\n\n";
	cout<<"\tEnter any character : ";
	cin>>ch;
    cout <<"\n\n";
	cout<<"\tThe ASCII equivalent is : "<<static_cast<int>(ch);
     cout <<"\n\n";
	 cout <<"\tEnd of Program";
     cout <<"\n\n";

}
Categories
C++

Reverse an Array in C++

I wrote this program using a C++ programming language to ask the user to give how many items to be processed and then the program will ask a series of integer value and then the program will reverse the arrangement of given numbers using one-dimensional array in C++.

I am currently accepting programming work, IT projects, school and application development, 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.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
#include <iostream>

using namespace std;

int main()
{
	int Arr[200],n=0,temp=0,i=0,j=0;
    
    cout <<"\n\n";
    cout <<"\tReverse an Array in C++";
    cout <<"\n\n";
	cout<<"\tHow many elements? : ";
	cin>>n;
    cout <<"\n\n";
	for(i=0;i<n;i++)
	{
		cout<<"\tEnter element "<<i+1<<":";
		cin>>Arr[i];
	}

	for(i=0,j=n-1;i<n/2;i++,j--)
	{
		temp=Arr[i];
		Arr[i]=Arr[j];
		Arr[j]=temp;
	}
    cout <<"\n\n";
	cout<<"\tReverse array results"<<endl;
	cout <<"\n\n";
    cout <<"\t";
	for(i=0;i<n;i++) {

		cout<<" "<< Arr[i]<<" ";
	}
	
	 cout <<"\n\n";
	 cout <<"\tEnd of Program";
     cout <<"\n\n";

}

Categories
C++

cout in C++

I wrote this program to show how to declare and use the cout statement in the C++ programming language. I am using code blocks as my text editor and g++ as my c++ compiler in writing this simple program.


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.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

Home

https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing
// cout.cpp
// February  19, 2020
// Bacolod City, Negros Occidental Philippines

#include <iostream>

using namespace std;


int main()
{
    cout <<"\n\n";
    cout <<"\tAuthor : Jake Rodriguez Pomperada";
    cout <<"\n\n";
    cout << "\tSample Text Display Using cout in C++";
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n\n";
}
Categories
C++

Palindrome Number Checker in C++

I wrote this program that will ask the user to give integer and then the program will determine and check if the given number is a palindrome or not a palindrome using a C++ programming language.


I am currently accepting programming work, IT projects, school and application development, 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.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

My video tutorial on my YouTube Channel.
Sample Program Output
Sample Program Output

Program Listing

palindrome.cpp

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

using namespace std;


int main()
{
    int n=0,num=0,digit=0,rev=0;
    
    cout <<"\n\n";
    cout <<"\tPalindrome Number Checker in C++ ";
    cout <<"\n\n";
    cout <<"\tGive a Positive Number : ";
    cin >> num;
    
    n = num;
    
    do {
        digit = num % 10;
        rev   = (rev * 10) + digit;
        num = num / 10;
        } while (num !=0);
        
    cout << "\tThe reverse of number is " << rev <<"\n";
    cout <<"\n\n";
    if (n == rev) {
          cout << "\tThe given number " << n<< " is a Palindrome.";
          }
         else {
                    cout << "\tThe given number " << n << " is  Not a Palindrome.";    
              }
                     
    cout <<"\n\n";
    cout << "\tEnd of the Program"; 
    cout <<"\n\n";     
    system("pause");
     }
     
Categories
C++

Leap Year Checker in C++

I wrote this simple program in C++ to ask the user to give a year and then the program will check and determine if the year is a leap year or not a leap year.

I am currently accepting programming work, IT projects, school and application development, 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.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

My tutorial video in my YouTube channel

Sample Program Output
Sample Program Output

Program Listing

leap_year.cpp

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

using namespace std;

int main()
{
    int year=0;

    cout <<"\n\n";
    cout <<"\tLeap Year Checker in C++";
    cout <<"\n\n";
    cout <<"\tGive a Year : ";
    cin >> year;
    cout <<"\n\n";
        
    if (year % 4 == 0) 
    {
      if (year % 100 == 0) 
       {
          if (year % 400 == 0)
               cout <<"\t"<< year << " is a Leap Year.";
             else
               cout <<"\t"<< year << " is Not a Leap Year.";              
       }       
     else 
        cout <<"\t"<< year << " is a Leap Year.";
        }
     else 
      cout <<"\t"<< year << " is Not a Leap Year.";    
      
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n\n";  
    system("pause");
}
Categories
C++

Area of the Circle in C++

I wrote this simple program in C++ to ask the user to give a radius value and then the program will compute the area of the circle using the C++ programming language.

I am currently accepting programming work, IT projects, school and application development, 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.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing


area_circle.cpp

#include <iostream>
#include <iomanip>

using namespace std;

const float PI = 3.1416;

float solve_area(int r);

float solve_area(int r)
{
    float area=0.00;

    area = (PI * r * r);
    cout << "\n\n";
    cout << setprecision(2) << fixed;
    cout << "The are of the circle is "
         << area << ".";
    cout << "\n\n";
    system("pause");
}

 main()
 {
      int radius=0;
      cout << "\t   AREA OF THE CIRCLE ";
      cout << "\n\n";
      cout << "Enter the radius :=> ";
      cin >> radius;
      solve_area(radius);
 }









Categories
C++

Merge Sort in C++

I wrote this program to ask the user to give how many items to be sorted and then the program will display the original and sorted arrangement of values using merge sort in C programming language.
I am currently accepting programming work, IT projects, school and application development, 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.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing

merge.cpp

#include<iostream>

using namespace std;

int Merge(int A[],int p, int q,int r)     
{

	int n1=q-p+1,i,j,k;       

	int n2=r-q;               

	int L[n1],R[n2];

	for(i=0;i<n1;i++)

	{
		L[i]=A[p+i];
	}

	for(j=0;j<n2;j++)
	{
		R[j]=A[q+j+1];
	}

	i=0,j=0;

	for(k=p;i<n1&amp;&amp;j<n2;k++)
	{
		if(L[i]<R[j])
		{
			A[k]=L[i++];
		}
		else
		{
			A[k]=R[j++];
		}
	}

	while(i<n1)            
	{
		A[k++]=L[i++];
	}
	
	while(j<n2)            
	{
		A[k++]=R[j++];
	}
}

int MergeSort(int A[],int p,int r)   
{
	int q;                                

	if(p<r)
	{
		q=(p+r)/2;                     
		MergeSort(A,p,q);
		MergeSort(A,q+1,r);
		Merge(A,p,q,r);
	}

}


int main()
{

	int A_Size=0;                          

	cout <<"\n\n";
    cout <<"\tMerge Sort in C++";
    cout <<"\n\n";
	cout<<"\tHow many elements? :";

	cin>>A_Size;

	int A[A_Size];
	

	for(int i=0;i<A_Size;i++)
	{
		cout <<"\tEnter value on element no. " <<i+1 << " : ";
		cin>>A[i];
	}

    cout<<"\n\n";
	cout <<"\tOriginal Arrangement";
	cout<<"\n\n";
	cout <<"\t";
	for(int i=0;i<A_Size;i++)
	{
		cout<<" " <<A[i]<<" ";
	}
	
	cout<<"\n\n";
	cout <<"\tSorted Arrangement";
	cout<<"\n\n";
	cout <<"\t";
	MergeSort(A,0,A_Size-1);
	for(int i=0;i<A_Size;i++)
	{
		cout<<" "<<A[i]<<" ";
	}

	cout<<"\n\n";
	cout <<"\tEnd of Program";
	cout<<"\n\n";
	
}

Categories
C++

Sum and Average of a Number in C++

I wrote this program 10 years ago in my C++ programming class in college where I am teaching here in Bacolod City, Negros Occidental Philippines. This program uses a one-dimensional array as its data structure to ask the user to give five numbers and then the program will calculate the sum and average of the five numbers and display the results on the screen.


I am currently accepting programming work, IT projects, school and application development, 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.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.


https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing

sum_average.cpp

#include <iostream>

using namespace std;

main() {
     int val[5], sum=0, average=0;

     cout << "\t\tSUM AND AVERAGE OF THE NUMBER 1.0";
     cout << "\n\n";
     for (int list=0; list < 5; list++) {
      cout << "Enter Item No. " << list+1 << " : ";
      cin >> list[val];
     }
     cout << "\n";
     for (int list=0; list < 5; list++) {
      sum+=list[val];
      average = (sum/5);
      cout << "  " << list[val] << " ";
     }
     cout << "\nThe total sum of the values is " << sum << ".";
     cout << "\nThe average of the values is " << average << ".";
     cout << "\n\n";
     system("PAUSE");
}