// Lab 4 - SECJ1013 - 21221
// Group Members:
// 1.MUHAMMAD NAJMI ZULHUSNI BIN MOHD SAPUAN
// 2.MUHAMMAD IMTIAAZ SYAQIB BIN ADANAN
// 3.MUHAMMAD ADAM LUQMAN BIN HAMZAH
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    string months[] = {"Jan", "Feb", "Mac"};
    float capitals[] = {4000, 3000, 5800};
    float sales[] = {7800, 5500.60, 9000.05};
    float profit; // percent of profit
    
    cout << "Month   Capital   Sale      Profit (%)\n";
    cout << "-----   --------  --------  ----------\n";
    
    for (int i = 0; i < 3; i++) {
        
        profit = (sales[i] - capitals[i]) / capitals[i] * 100;
        cout << left << setw(7)   << months[i] << " " 
		     << right<< setw(8)   << fixed << setprecision(2) << capitals[i] << " " 
                     << setw(8)   << fixed << setprecision(2) << sales[i]    << " " 
			         << setw(9)   << fixed << setprecision(1) << profit      << "\n";
    }
   
    return 0; 
}

