Activity 1.11
Source Code
class Program {
static void Main() {
Console.WriteLine("Activity 1.11");
// choice variable
string choice;
Console.WriteLine("-- Main Function --");
// menu
Console.WriteLine("E1 - Example 1");
Console.WriteLine("E2 - Example 2");
Console.WriteLine("Q - Quit");
Console.Write("Choice: ");
choice = Console.ReadLine()!;
// conditionals
if (choice == "E1") {
// example1 function call
} else if (choice == "E2") {
// example2 function call
} else if (choice == "Q") {
Console.WriteLine("Quitting!");
} else if (choice == "P1") {
} else if (choice == "P2") {
} else if (choice == "P3") {
} else if (choice == "P4") {
} else if (choice == "P5") {
} else if (choice == "P6") {
} else if (choice == "P7") {
} else if (choice == "P8") {
} else if (choice == "P9") {
} else if (choice == "P10") {
} else {
Console.WriteLine("Invalid Choice");
}
}
// example1 function definition
// example2 function definition
// problem1 function definition
// problem2 function definition
// problem3 function definition
// problem4 function definition
// problem5 function definition
// problem6 function definition
// problem7 function definition
// problem8 function definition
// problem9 function definition
// problem10 function definition
}
Complete Source Code
Last updated