Categories
C++

Philippine Peso to Other Currencies in C++

Machine Problem in C++

 In this tutorial I wrote this program to ask the user  to give Philippine Peso value and convert it to other

 currencies like  hongkong dollar, uae derham, us dollar,   and japanese yen.

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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

/* php_peso.cpp


 Machine Problem in C++

 In this tutorial I wrote this program will ask the user
 to give Philippine Peso value and convert it to other
 currencies like  hongkong dollar, uae derham, us dollar, 
 and japanese yen.
 

 Mr. Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com
 www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines.

 */

#include <iostream>
#include <iomanip>
 

 int main()

 {

 	float php_peso = 0.00;
 	float hk_dollar = 0.00, uae_dirham = 0.00;
 	float us_dollar = 0.00, jpn_yen = 0.00;

 	std::cout <<"\n\n";
 	std::cout <<"\tPhilippine Peso to Other Currencies in C++";
	std::cout <<"\n\n";
 	std::cout <<"\tGive Philippine Peso Value : ";
    std::cin >> php_peso;
 	std::cout <<"\n\n";

 	hk_dollar = (php_peso * 0.16137);
    uae_dirham = (php_peso * 0.07646);
    us_dollar = (php_peso * 0.02081);
    jpn_yen =   (php_peso* 2.1612);

   	std::cout <<"\tHong Kong Dollar :  " 
	 << std::setprecision(3) << hk_dollar <<"\n";
	std::cout << std::fixed << std::showpoint;
 	std::cout <<"\tUAE Dirham       :  " << std::setprecision(3) 
	 <<uae_dirham <<"\n"; 
	 	std::cout << std::fixed << std::showpoint;
	std::cout <<"\tUS Dollar        :  " << std::setprecision(3) 
	<< us_dollar <<"\n";
		std::cout << std::fixed << std::showpoint;
	std::cout <<"\tJapanese Yen     :  " << std::setprecision(3) 
	<< jpn_yen <<"\n"; 
		std::cout << std::fixed << std::showpoint;
	std::cout <<"\n\n";
 	std::cout <<"\tEnd of Program";
 } // End Code
Categories
C++

Selection Sort in C++

 Machine Problem in C++

Write a program to ask the user to give a series of numbers and then the program will sort the given numbers using selection sort algorithms.

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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* selection_sort.cpp
       
    Machine Problem in C++
    
	Write a program to ask the user to give a series of
	numbers and then the program will sort the given 
	numbers using selection sort algorithms.
	    
    Jake R. Pomperada, MAED-IT, MIT
    www.jakerpomperada.com
    www.jakerpomperada.blogspot.com
    [email protected]
    Bacolod City, Negros Occidental, Philippines

*/ 

#include <iostream>

void selection_sort();

int i=0,a[100], num=0;

int main()
{
    
    std::cout <<"\n\n";
    std::cout <<"\tSelection Sort in C++";
    std::cout <<"\n\n";
    std::cout <<"\tHow many items in the array? : ";
    std::cin >> num;
	std::cout <<"\n\n";
    
      for(i=0; i<num; i++) {
     	   std::cout <<"\tGive value in item no." << i+1 << " : ";
     	   std::cin >> a[i];
        }
    std::cout <<"\n\tBefore sorting:\n";
    std::cout <<"\n";
	std::cout <<"\t";
    for(i=0; i<num; i++)
        std::cout << " " << a[i] << " ";
    selection_sort();
    std::cout <<"\n";
    std::cout <<"\n\tAfter sorting:\n";
    std::cout <<"\n";
	std::cout <<"\t";
    for(i=0; i<num; i++)
        std::cout << " " << a[i] << " ";
    std::cout <<"\n\n";
    std::cout <<"\tEnd of Program";
	}

void selection_sort()
{
    int i, j, min, temp;
    for (i=0; i<num; i++)
    {
        min = i;
        for (j=i+1; j<num; j++)
        {
            if (a[j] < a[min])
                min = j;
        }
        temp = a[i];
        a[i] = a[min];
        a[min] = temp;
    }
}
Categories
C++

Difference of Two Numbers Using Modern C++

 Machine Problem in C++

 Write a program to ask the user to give two numbers and then the program will solve the difference of two  numbers on the screen using Modern 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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

// difference_two.cpp
//
// Machine Problem in C++
// Write a program to ask the user to give two numbers
// and then the program will solve the difference of two
// numbers on the screen using Modern C++.
//
// Mr. Jake R. Pomperada,MAED-IT,MIT
// www.jakerpomperada.com
// www.jakerpomperada.blogspot.com
// [email protected]
// Bacolod City, Negros Occidental, Philippines


#include <iostream>

int main()
{
	int difference=0,a=0,b=0;
	
	std::cout <<"\n\n";
	std::cout <<"\tDifference of Two Numbers Using Modern C++";
	std::cout <<"\n\n";
	std::cout <<"\t Give First  Value : ";
	std::cin >> a;
	std::cout <<"\t Give Second Value : ";
	std::cin >> b;
	std::cout <<"\n\n";
	
	difference = (a-b);
	
	std::cout <<"\tThe difference between " << a
	          << " and " << b << " is " << difference <<".";
	std::cout <<"\n\n";
	std::cout <<"\tEnd of Program";
	std::cout <<"\n";
}
Categories
C++

Compound Interest in C++

 Machine Problem in C++

Write a C++ program to input principal amount, time and rate  (P, T, R) from user and find compound interest of a loan.

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 at 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 [email protected], [email protected], and [email protected] 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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price.

My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.comIf you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.Your support on my channel is highly appreciated.Thank you very much.

Program Listing

/* compound_interest.cpp

Machine Problem in C++

Write a C++ program to input principal amount, time and rate 
(P, T, R) from user and find compound interest of a loan.

Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
www.jakerpomperada.com
www.jakerpomperada.blogspot.com
[email protected]
Bacolod City, Negros Occidental Philippines
*/

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

int main()
{
    double principal_amount=0.00, time=0.00, rate=0.00,amount=0.00;
    double compound_interest=0.00;
    
    std::cout <<"\n\n";
    std::cout <<"\tCompound Interest in C++";
    std::cout <<"\n\n";
    std::cout <<"\tGive Principal Amount     : ";
    std::cin >> principal_amount;
    
    std::cout <<"\n";
    std::cout <<"\tGive Time Duration        : ";
    std::cin >>time;
    std::cout <<"\n";
    std::cout <<"\tGive Annual Interest Rate : ";
    std::cin >>rate;

    // Calculate compound  interest 
     amount=principal_amount*pow((1 +rate/100),time);
 
     compound_interest=amount-principal_amount;

    std::cout <<"\n";
    std::cout << std::setprecision(2); 
    std::cout << std::fixed;
    std::cout <<"\tThe Compound Interest is $ "
	     <<compound_interest;
    std::cout <<"\n\n";
    system("pause");
    
}


Categories
C++

Reverse a String in C++

 Machine Problem in C++

  Write a program to ask the user to give a string and then the program will reverse the given string 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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* 

 Machine Problem in C++
 
 Write a program to ask the user to give a string and then
 the program will reverse the given string and display the
 results on the screen.
 
 reverse_string.cpp
 Mr. Jake Rodriguez Pomperada, MAED-IT,MIT
 www.jakerpomperada.com
 www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 
 */
 
#include <iostream>


int main() {
 
  std::string greeting,display_original;
  
  std::cout << "\n\n";
  std::cout << "\tReverse a String in C++";
  std::cout << "\n\n";
  std::cout << "\tGive a String : ";
  std::getline(std::cin,greeting);
  
  display_original = greeting;
  
  int len = greeting.length();
  int n=len-1;
  for(int i=0;i<(len/2);i++){
  
    std::swap(greeting[i],greeting[n]);
    n = n-1;

  }
    
  std::cout << "\n\n";
  std::cout << "\tDisplay Results";
  std::cout << "\n\n";
  std::cout << "\t Original String : " << display_original;
  std::cout << "\n\n";
  std::cout << "\t Reverse  String : " << greeting;
  std::cout << "\n\n";
  std::cout << "\tEnd of Program";
  std::cout << "\n\n";
  }
Categories
C++

Automatic Teller Machine Simulation in C++

Machine Problem in C++

 Write a C++ program to simulates the operation of an Automatic Teller Machine.

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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

#include <iostream>

/*
 Machine Problem in C++
 
 Write a C++ program to simulates the operation of an
 Automatic Teller Machine.
*/
// Created By Mr. Jake R. Pomperada, MAED-IT, MIT
// www.jakerpomperada.blogspot.com
// www.jakerpomperada.com
// [email protected]
// Bacolod City, Negros Occidental Philippines

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;
		 
		 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++

Addition of Three Numbers Using Modern C++

 Machine Problem in C++

Write a program that will ask the user to give three numbers and then the program will compute its sum using Modern C++ approach.

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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* addition_of_three_numbers.cpp
   Jake Rodriguez Pomperada,MAED-IT,MIT
   www.jakerpomperada.com
   www.jakerpomperada.blogspot.com
   [email protected]
   December 13, 2020
   Bacolod City, Negros Occidental


Machine Problem in C++

Write a program that will ask the user to give three numbers
and then the program will compute its sum using Modern C++
approach.

*/

#include <iostream>


int main()
{
    int a=0, b=0, c=0, sum=0;
    
    std::cout << "\n\n";
    std::cout << "\tAddition of Three Numbers Using Modern C++";
    std::cout << "\n\n";
    std::cout << "\tEnter First Number  : ";
    std::cin >> a;
    std::cout << "\tEnter Second Number : ";
    std::cin >> b;
    std::cout << "\tEnter Third Number  : ";
    std::cin >> c;

    sum = (a+b+c);
    
    std::cout << "\n\n";
    std::cout << "\tThe sum of " <<a << "," << b << ","
              << " and " << c << " is "  << sum << ".";
   
    std::cout << "\n\n";
    std::cout << "\tEnd of Program";
    std::cout << "\n";
}

Categories
C++

Sum and Product of Two Numbers Using Modern C++

 Machine Problem in C++

Write a program that will compute the sum and product of two input numbers.

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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* sum_product.cpp
   Jake Rodriguez Pomperada,MAED-IT,MIT
   www.jakerpomperada.com
   www.jakerpomperada.blogspot.com
   [email protected]
   December 13, 2020
   Bacolod City, Negros Occidental


Machine Problem in C++

Write a program that will compute the sum and product of two input numbers.

*/


#include <iostream>


int main()
{
    int a=0, b=0;
    
    std::cout << "\n\n";
    std::cout << "\tSum and Product of Two Numbers Using Modern C++";
    std::cout << "\n\n";
    std::cout << "\tEnter First number  : ";
    std::cin >> a;
    std::cout << "\tEnter Second number : ";
    std::cin >> b;
    std::cout << "\n\n";
    std::cout << "\tThe sum is: " << a+b << "\n";
    std::cout << "\tThe product is: " << a*b << "\n";    
    std::cout << "\n\n";
    std::cout << "\tEnd of Program";
    std::cout << "\n";
}
Categories
C++

Hello World in Modern C++

 In this tutorial I will show you how to write a hello world using modern C++ code.

 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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

#include <iostream>


int main()
{
	std::cout << "\tHello World in Modern C++";
}
Categories
C++

Accept Five Numbers and Display it Using One Dimensional Array in C++

Write a program using C++ that will ask the user to give five numbers and then the program will display the list of given numbers using a one-dimensional array.

 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 at 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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/*
Machine Problem in C++

Write a program using C++ that will ask the user to give 
five numbers and then the program will display the list
of given numbers using a one-dimensional array.

*/
// accept_display.cpp
// Jake R. Pomperada, MAED-IT, MIT
// www.jakerpomperada.com
// www.jakerpomperada.blogspot.com
// [email protected]
// Bacolod City, Negros Occidental

#include <iostream>

using namespace std;

int main()
{
	int a[5];     
	int i=0;
	
	cout <<"\n\n";
	cout <<"\tAccept Five Numbers and Display it Using One Dimensional Array in C++";
	cout <<"\n\n";
		for(i=0;i<5;i++){
		 cout << "\tEnter Value in Item No. " << i+1 << " : ";
		 cin >> i[a];
	}
	cout <<"\n\n";
	cout <<"\tDisplay the Results";
	cout <<"\n\n";
	cout << "\tThe given values are as follows";
	cout <<"\n\n";
	cout <<"\t";
	for(i=0;i<5;i++){
		 cout <<"" << i[a] <<" ";
    }
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n";
}