LAB TASK SOLUTION NOUROOZ
LAB TASK SOLUTION NOUROOZ
LAB TASK SOLUTION NOUROOZ
class ShoppingMall {
public:
int main() {
ShoppingMall mall;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int numVehicles;
cout << "Enter the number of vehicles to process: ";
cin >> numVehicles;
if (isSafeSpeed(speed, speedLimit)) {
cout << "Vehicle speed is within the safe range." << endl;
} else {
int fine = calculateFine(speed, speedLimit);
cout << "Overspeeding! Fine: " << fine << " units." << endl;
}
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
double income, rate;
// Display results
cout << "\nTax Calculation using Macro:" << endl;
cout << "Direct income * rate: " << macroTax << endl;
cout << "Expression (income - 1000) * rate: " << macroTaxWithExpression <<
endl;
cout << "\nTax Calculation using Inline Function:" << endl;
cout << "Direct income * rate: " << inlineTax << endl;
cout << "Expression (income - 1000) * rate: " << inlineTaxWithExpression <<
endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
cout << "Total Hostel Fee with default charges: $" << calculateHostelFee() <<
endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
cout << "Product Inventory Tracker" << endl;
return 0;
}
.#include <iostream>
using namespace std;
int main() {
int n;
// Print results
cout << "\nResults:" << endl;
cout << "Highest marks: " << highest << endl;
cout << "Lowest marks: " << lowest << endl;
cout << "Average marks: " << average << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int matrix[SIZE][SIZE];
int transposed[SIZE][SIZE];
int totalCarsParked = 0;
void parkCar() {
string carNumber;
int hoursParked;
const int feePerHour = 10;
int main() {
int numberOfCars;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main() {
string username, password;
int attempts = 0;
const int maxAttempts = 3;
while (attempts < maxAttempts) {
cout << "Enter username: ";
cin >> username;
cout << "Enter password: ";
cin >> password;
if (authenticateUser(username, password)) {
cout << "Access Granted" << endl;
return 0;
} else {
cout << "Invalid credentials. Try again." << endl;
attempts++;
}
}
cout << "Units Consumed: " << unitsConsumed << " units" << endl;
cout << "Bill with Local Rate ($" << ELECTRICITY_UNIT_RATE << "): $" <<
billWithLocalRate << endl;
cout << "Bill with Global Rate ($" << ::ELECTRICITY_UNIT_RATE << "): $" <<
billWithGlobalRate << endl;
}
int main() {
double unitsConsumed;
return 0;
}
#include <iostream>
int main() {
int n;
char update;
do {
int empIndex;
double newSalary;
cout << "Enter the new salary for Employee " << empIndex << ": ";
cin >> newSalary;
return 0;
}