Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- class Program
- {
- static void Main(string[] args)
- /*Program header
- * Program Name: Basic User Interface
- * Programmer: Sean Landau
- * Program Description: Getting your name, age, gas mileage */
- {
- string age="";
- string name="";
- string input = "";
- double gmile=0;
- DisplayApplicationInformation();
- DisplayDivider("Start Program");
- GetInput(ref input);
- GetAge(ref input);
- GetMileage();
- }
- private static void DisplayApplicationInformation()
- {
- Console.WriteLine("Welcome the Basic User Interface Program");
- Console.WriteLine("CIS247,Week 1 Ilab");
- Console.WriteLine("Solution");
- Console.WriteLine("This program accepts user input as a string, then makes the appropriate data conversion");
- }
- private static void DisplayDivider(string outputTitle)
- {
- Console.WriteLine("********" + outputTitle + "********");
- }
- public static string GetInput(ref string input)
- {
- DisplayDivider("get name");
- Console.Write("Your Name Is: ");
- Console.ReadLine();
- return input;
- }
- public static string GetAge(ref string input)
- {
- DisplayDivider("get age");
- Console.Write("Your Age Is: ");
- Console.ReadLine();
- return input;
- }
- }
- }
Add Comment
Please, Sign In to add comment