Categories
Java

US Dollar to Philippine Peso in Java

 Machine Problem in Java

  Write a program that will ask for the user to input a certain amount in US Dollar and it will give you its equivalent amount into Philippine Peso.

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

import java.util.Scanner;
import java.text.DecimalFormat;

/**
 * Machine Problem in Java
 * 
 * Write a program that will ask for the user to input a certain amount in US Dollar
 * and it will give you its equivalent amount into Philippine Peso.
 * 
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * [email protected]
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * January 6, 2020 Wednesday
 */
public class USDollar_Philippine_Peso {
	
	 private static DecimalFormat df2 = new DecimalFormat("#.##");

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		    double ustopeso = 48.04;
	        double us=0.00;
	        
	        Scanner reader = new Scanner(System.in);
	        System.out.println("\n");
		    System.out.print("\t\tUS Dollar to Philippine Peso in Java");
		    System.out.println("\n");
		    
		    System.out.print("\tGive amount in US Dollar : ");
	        us = reader.nextDouble();
	        double amountinpeso = us*ustopeso;
	        
	        System.out.print("\n");
	        System.out.println("\tThe value in Philippine Peso is PHP " +df2.format(amountinpeso));
	        System.out.print("\n");
			System.out.println("\tEnd of Program");
	        System.out.println("\n\n");

        reader.close();
	}

}
Categories
Java

Cube a Number in Java

Machine Problem in Java

Write a program to ask the user to give a number and then the program will compute the cube value of the given number by the user.

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

/**
Machine Problem in Java

Write a program to ask the user to give a number and then the 
program will compute the cube value of the given number by
the user.

 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 January 2, 2021 Friday  5:48 PM
*/

import java.util.*;

public class Cube_Number {
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
	 Scanner sc=new Scanner(System.in);
     int num=0;
     
     System.out.println();  
	    System.out.println("\tCube a Number in Java");
	    System.out.println();
  
     System.out.print("\tGive a Number : ");
     num=sc.nextInt();
  
     System.out.println();
	    System.out.println("\tSquare of "+ num + " is "+ Math.pow(num, 3));
     System.out.println();
     System.out.println("\tEnd of Program");
     System.out.println("\n");

	}
}
Categories
Java

Square a Number in Java

Machine Problem in Java

Write a program to ask the user to give a number and then the program will compute the square value of the given number by the user.

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
/**
Machine Problem in Java

Write a program to ask the user to give a number and then the 
program will compute the square value of the given number by
the user.

 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 January 2, 2021 Friday  2:44 PM
*/

import java.util.*;

public class Square_Number {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc=new Scanner(System.in);
	        int num=0;
	        
	        System.out.println();  
		    System.out.println("\tSquare a Number in Java");
		    System.out.println();
	     
	        System.out.print("\tGive a Number : ");
	        num=sc.nextInt();
	     
	        System.out.println();
		    System.out.println("\tSquare of "+ num + " is "+ Math.pow(num, 2));
	        System.out.println();
	        System.out.println("\tEnd of Program");
	        System.out.println("\n");
	}

}
Categories
Java

Methods in Java

Machine Problem

Write a program that will show how to declare and use methods in Java 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 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


/**
Machine Problem in Java

Write a program that will show how to declare and use
methods in Java programming language.

 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 23, 2020   Wednesday
*/
public class Methods {

	  // create a method
	  public int Addition(int a, int b) {
	    int sum = a + b;
	    // return value
	    return sum;
	  }
	  
	// method with no parameter
	  public void title() {
		System.out.println();  
	    System.out.println("\tAddition of Two Numbers");
	    System.out.println();
	  }
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
			 
        System.out.println("\n");
        System.out.print("\tMethods in Java");
        System.out.println("\n");
        
        int a = 12;
        int b = 3;

        // create an object of Methods
        Methods objdemo = new Methods();
        
        // calling methods
        
        objdemo.title();
        
        int result = objdemo.Addition(a, b);
        
        System.out.println("\tThe sum of " +a + " and " 
          + b + " is "  + result + ".");
        System.out.println();
        System.out.println("\tEnd of Program");
        System.out.println("\n");
        

	}

}
Categories
Java

Bubble Sort in Java

  Machine Problem in Java

 Write a program that will a series of numbers and then it will sort it using bubble sort algorithm in Java 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 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

import java.util.Scanner;

/**
 * Machine Problem in Java
 * 
 * Write a program that will a series of numbers and then it will sort it using 
 * bubble sort algorithm in Java programming language.
 * 
 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 15, 2020  Tuesday   10:22
*/

public class Bubble_Sort {
	
	

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner input=new Scanner(System.in);  
		 
		 		
		int elements[]=new int[100];
				
		
		 System.out.println("\n");
	     System.out.print("\t\tBubble Sort in Java");
		 System.out.println("\n");
		 

		 System.out.print("Enter the number of elements you want to store: ");  
	  
		 int n=input.nextInt();  
	  
	
		System.out.println();
		 for(int i=0; i<n; i++)  
		 {  
			 System.out.print("Enter the element No. " + (i+1) + " : ");     
		     elements[i]=input.nextInt();  
		 
		 }  
		 
		 	System.out.println();
		    System.out.println("UnSorted Items of Arrays");
		    System.out.println();
		    
			 for(int i=0; i<n; i++)  
			 {  
			 //reading array elements from the user   
				    System.out.print("" + elements[i] + " ");
			 
			 }  

	     // Bubble Sort Routine Here
			 
	        for (int i = 0; i < n-1; i++)
	            for (int j = 0; j < n-i-1; j++)
	                if (elements[j] > elements[j+1])
	                {
	                    
	                    int temp = elements[j];
	                    elements[j] = elements[j+1];
	                    elements[j+1] = temp;
	        	         }
	        
	        System.out.println("\n");
	        System.out.println("Sorted Items of Array");
	        System.out.println();
		 for(int i=0; i<n; i++)  
		 {  
	    System.out.print("" + elements[i] + " ");
		 
		 }  
		 
		 System.out.println("\n");
	     System.out.print("\tEnd of Program");
	      System.out.println("\n");
		 input.close();
	        
	        
	}

}
Categories
Java

Average of Four Numbers in Java

 A simple program that I wrote using Java programming language to ask the user to give four numbers and then the program will compute the average of the given 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

/* Average_of_Four_Numbers.java
 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT
 * December 8, 2020 Tuesday
 * www.jakerpomperada.blogspot.com
 * www.jakerpomperada.com
 * [email protected]
 * Bacolod City, Negros Occidental
 */

import java.util.Scanner;

public class Average_of_Four_Numbers {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner input = new Scanner(System.in);
        
        System.out.println("\n");
        System.out.print("\tAverage of Four Numbers in Java");
        System.out.println("\n");
        System.out.print("\tGive First Value  : ");
        int first = input.nextInt();
        System.out.print("\tGive Second Value : ");
        int second = input.nextInt();
        System.out.print("\tGive Third Value  : ");
        int third = input.nextInt();
        System.out.print("\tGive Fourth Value : ");
        int fourth = input.nextInt();
        
        
        int total_sum = (first+second+third+fourth);
        
        int  average = (total_sum)/4;
        
        input.close();
        
        System.out.println();
        System.out.println("\tGiven Numbers are as follows");
        System.out.println();
        System.out.println("\t" + first + ", "+ second +", "+ third 
        		+ ", and " + fourth+".");
        System.out.println();
        System.out.print("\tThe average is " + average + ".");
        System.out.println("\n");
        System.out.println("\tEnd of Program");
        System.out.println("\n");

	}

}
Categories
Java

Civil Status Checker Using If-Else If in Java

 A program that I wrote using Java programming language to ask the user to select its civil status from a menu and display the selected civil status 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


import java.util.Scanner;

/**

 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 7, 2020   Monday  12:16 PM
*/


public class Civil_Status_Checker {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		  Scanner input = new Scanner(System.in);
	        
	        System.out.println("\n");
	        System.out.print("\tCivil Status Checker Using If-Else If in Java");
	        System.out.println("\n");
	        System.out.print("\tA - Single,  B - Married,  C - Widow,  D - Divorced,  E - Separated ==> ");
	        char  civil_status =input.next().charAt(0);
	        
	        char select = Character.toUpperCase(civil_status);
	        
	        System.out.println();
	        
	        if (select == 'A') {
	        	System.out.print("\tYou civil status is SINGLE.");
	        } else if (select == 'B') {
	        	System.out.print("\tYou civil status is MARRIED.");
	        } else if (select == 'C') {
	        	System.out.print("\tYou civil status is WIDOW.");
	        }  else if (select == 'D') {
	        	System.out.print("\tYou civil status is DIVORCED.");
	        } else if (select == 'E') {
	        	System.out.print("\tYou civil status is SEPARATED.");
	        } else {
	        	System.out.print("\tInvalid Option. Try Again.");
	        }
	        System.out.println("\n");
	    	System.out.print("\tEnd of Program");
	        System.out.println("\n");
		}
}
Categories
Java

Addition of Two Numbers in Java

 I create this tutorial to show how to write addition of two numbers using Java 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 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_Two_Numbers.java
 *  Mr. Jake R. Pomperada, MAED-IT, IT
 *  www.jakerpomperada.com
 *  www.jakerpomperada.blogspot.com
 *  [email protected]
 *  Bacolod City, Negros Occidental Philippines
 */  

import java.util.Scanner;

public class Addition_Two_Numbers {

  public static void main(String[] args) {

   int a=0, b=0, sum=0;

  Scanner input = new Scanner(System.in);

   System.out.println();
  System.out.print("\tAddition of Two Numbers in Java (TAGALOG VERSION):
  System.out.println("\n");
  System.out.print;n("\tGive First Value : ");
  a = input.nextInt();
 System.out.println();
  System.out.print;n("\tGive First Value : ");
  b = input.nextInt();

 sum = a + b;

 System.out.println(); 
 System.out.println("\tThe sum of " + a + " and " + b + " is " + sum + ".");
  System.out.println();
  System.out.println("\tEnd of Program");
  System.out.println();
 }
}
Categories
Java

Employees Payroll System in Java

 Machine Problem in Java

Write a simple payroll program that will display the employee’s information. The program should perform the following:

* Ask the user to enter the name of the employee

* Prompt the user to select between full time and part time   by pressing either F (full time) or P (part-time)

* If F is pressed, ask the user to enter his monthly salary.

  Then display his name and salary.

  If P is pressed, ask the user to type his rate(pay) per hour, then   the number of hour, and then the number of overtime. Then display his or her name and wage. The computation pay is:

  hours of overtime x (rate per hour x 125%)

  If an invalid letter is pressed, display an error message.

 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

Employees_Payroll_System.java

import java.text.DecimalFormat;

import java.util.Scanner;

/**
Machine Problem in Java

Write a simple payroll program that will display the employee's
information. The program should perform the following:

 Ask the user to enter the name of the employee
 Prompt the user to select between full time and part time
 by pressing either F (full time) or P (part time)
 If F is pressed, ask the user to enter his monthly salary.
 Then display his name and salary.

  If P is pressed, ask the user to type his rate(pay) per hour, then
  the number of hour and then number of overtime. Then display his
  or her name and wage. The computation pay is:
  hours of overtime x (rate per hour x 125%)

  If an invalid letter is pressed, display an error message.
 
 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 4, 2020   Friday 7:52 AM
*/


public class Employees_Payroll_System {
	
	private static DecimalFormat df2 = new DecimalFormat("#.##");

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		  Scanner input = new Scanner(System.in);
	        
	        System.out.println("\n");
	        System.out.print("\tEmployees Payroll System in Java");
	        System.out.println("\n");
	        System.out.print("\tEnter Employees Name : ");
	        String emp_name =input.nextLine();
	        System.out.print("\tPress F for Full Time or P for Part Time : ");
	        char job_criteria =input.next().charAt(0);
	        
	        char select = Character.toUpperCase(job_criteria);
	        
	        System.out.println();
	        
	        if (select == 'F') {
	        	System.out.print("\t------ Full Time Employee ----- ");
	        	System.out.println();
	        	System.out.print("\tEnter Basic Pay :  ");
	            double basic_pay = input.nextDouble();
	            
	            System.out.println("\n");
	            System.out.println("\t-----------------------------------\n");
	            System.out.println("\tEmployees Name :  " + emp_name );
	            System.out.println("\tBasic Pay      :  " + df2.format(basic_pay));
	            System.out.println();
	            System.out.print("\t-----------------------------------\n");
	            System.out.print("\tGross Pay      :    " + df2.format(basic_pay));
	            System.out.println("\n");
	        } else if (select == 'P') {
	        	
	        	System.out.print("\t------ Part Time Employee ----- ");
	        	System.out.println("\n");
	        	System.out.print("\tEnter Rate Per Hour       :  ");
	            double rate_per_hour = input.nextDouble();
	            
	            System.out.print("\tEnter No. of Hour(s) Work :  ");
	            double no_hours_work2 = input.nextDouble();
	            
	            System.out.print("\tEnter No. of Overtime     :  ");
	            double no_overtime = input.nextDouble();
	            
	            double basic_pay2 =  (rate_per_hour * no_hours_work2); 
	            double overtime_pay = (no_overtime * rate_per_hour * 1.25);
	            
	            double gross_pay = (basic_pay2 + overtime_pay);
	            		
	            System.out.println("\n");
	            System.out.println("\t-----------------------------------");
	            System.out.println("\tEmployees Name :  " + emp_name );
	            System.out.println("\tBasic Pay      :  " + df2.format(basic_pay2));
	            System.out.println("\tOvertime Pay   :  " + df2.format(overtime_pay));
	            System.out.print("\t-----------------------------------\n");
	            System.out.println("\tGross Pay      :  " + df2.format(gross_pay));
	            System.out.println("\n");
	        } else {
	           	System.out.println("\n");
		        System.out.print("\tInvalid Option. Please Try Again");
	           }
	        
	     	System.out.print("\tEnd of Program");
	        System.out.println("\n");
    
	   }     
	}


Categories
C++

BUBBLE SORT IN DECENDING ORDER IN C++

 I will show you how to write a program that will ask the user to give a series of numbers and then the program will sort the given number using a bubble sort algorithm in descending order 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 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

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

#include <cstdlib>
#include <iostream>

using namespace std;

int compare(int, int);
void sort(int[], const int);
void swap(int *, int *);

int compare(int x, int y)
{ 
     return(x < y);
}

void swap(int *x, int *y)
{
     int temp;
     temp = *x;
     *x = *y;
     *y = temp;
}

void sort(int table[], const int n)
{
     for(int i = 0; i < n; i++)
     {
          for(int j = 0; j < n-1; j++)
          {
               if(compare(table[j], table[j+1]))
                    swap(&table[j], &table[j+1]);
          }
     }
}

int quantity;
int* tab;

int main(int argc, char *argv[])
{
    cout << "\n\n"; 
	cout << "\t\t\tBUBBLE SORT IN DECENDING ORDER\n";
    cout << "\n\t\t Created By: Mr. Jake R. Pomperada, MAED-IT, MIT";
    cout << "\n\n";   
    cout << "\tHow Many Items :=> ";
	cin >> quantity;
	tab = new int [quantity];
	
	cout << "\n\n";   
	for (int i = 0; i < quantity; i++)
	{
    int x = i;
    cout << "\tGive value in item no. " << ++x << ": ";
    cin >> tab[i];
	}

cout << "\n\tBefore Sorting: ";
cout << "\n\n";
cout << "\t";
for (int i = 0; i < quantity; i++)
{
     cout << tab[i] << " ";
}

cout << "\n\n";
cout << "\tAfter Sorting: \n";
sort(tab, quantity);
cout << "\n\n";
cout <<"\t";
for(int i = 0; i < quantity; i++)
{
     cout << tab[i] << " ";
}
 cout << "\n\n";
    system("PAUSE");
    return EXIT_SUCCESS;
}