// Calculating shipping costs with nested logic
#include <iostream>
int main() {
int regionCode;
double weight;
std::cin >> regionCode >> weight;
// Outer check: Destination
if (regionCode == 1)
{
// Inner check: Domestic Weight Rules
if (weight <= 10.0)
{
std::cout << "Shipping Cost: $15.00" << std::endl;
} else {
std::cout << "Shipping Cost: $25.00" << std::endl;
}
}
else if (regionCode == 2)
{
// Inner check: International Weight Rules
if (weight <= 5.0)
{
std::cout << "Shipping Cost: $50.00" << std::endl;
}
else
{
std::cout << "Shipping Cost: $85.00" << std::endl;
}
}
else
{
// Handle invalid region codes
std::cout << "Error: Invalid Region" << std::endl;
}
return 0;
}