import 'dart:io'; void main() { print("Welcome to the Concert Ticket Sales Tracker!"); double ticketPrice = 50.0; int ticketsSold = 0; double totalRevenue = 0; while (ticketsSold < 200) { ticketsSold += 20; // simulate selling 20 tickets at a time totalRevenue = ticketPrice * ticketsSold; print("Tickets sold: $ticketsSold | Total revenue: \$${totalRevenue.toStringAsFixed(2)}"); // offer discounts for seniors and children int age = ticketsSold % 80; // simulate random age pattern if (age >= 60) { print("Senior discount applied for age $age!"); } else if (age < 12) { print("Child discount applied for age $age!"); } // ternary operator for late fee after 9 PM (simulated condition) int hour = ticketsSold ~/ 40; // simulate hour progression double finalPrice = (hour > 9) ? (ticketPrice + 10) : ticketPrice; print("Current ticket price with late fee if applied: \$${finalPrice.toStringAsFixed(2)}"); } print("All tickets sold! Total Revenue: \$${totalRevenue.toStringAsFixed(2)}"); }