// Lab 3 - SECJ1013 - 21221
// Group Members:
// 1.MUHAMMAD NAJMI ZULHUSNI BIN MOHD SAPUAN
// 2.MUHAMMAD IMTIAAZ SYAQIB BIN ADANAN
// 3.MUHAMMAD ADAM LUQMAN BIN HAMZAH


// Study and identify the issues of the below program. Improve 
// the source code of the program so the solutions can be made 
// in a more systematic and efficient ways by using parallel 
// and multidimensional arrays.

#include <iostream>
#include <string>


using namespace std;

#define PRICE 3
#define TAX 2
#define ITEM 3



int main() {
    string item[ITEM];
    float totalPrice[PRICE][TAX];
    
    for (int i = 0; i < 3; i++){
    	
        cout << "\nItem " << (i + 1) << ": ";
        cin >> item[i];
        cout << "Price " << (i + 1) << ": ";
        cin >> totalPrice[i][0];
        cout << "Tax " << (i + 1)<<": ";
        cin >> totalPrice[i][1];
    }
    
    
    cout << "\n\n";
    
    
    cout << "Item. \tPrice \tTax \tTotal Price\n";
    for (int i = 0; i < 3; i++){
		cout << item[i] << " \t" << totalPrice[i][0] << " \t" << totalPrice[i][1] << " \t" << (totalPrice[i][0] + totalPrice[i][1]) << "\n";
	}
    
    return 0;
}
