using System; namespace PS1_Q4 { // // Problem Set 1, Question 4 // Written by Paul Hudak // September 19, 2006 // class PS1_Q4 { // // A "mad-lib" program, with modularity. // [STAThread] static void Main(string[] args) { // display welcome message Console.WriteLine("Welcome to the Game of Mad-lib!\n"); // query user for each input string adjective = Query("Please input an adjective: "); string verb = Query("Now input a verb (past tense): "); string noun = Query("Finally, input a noun: "); // display result Console.WriteLine("\n*** The {0} professor {1} my {2}, and I've never recovered. ***\n", adjective, verb, noun); } public static string Query(string query) { // display query argument Console.Write(query); // get user input return Console.ReadLine(); } } }