Guest User

Untitled

a guest
Nov 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. {
  2. class Program
  3. {
  4. static void Main(string[] args)
  5. /*Program header
  6. * Program Name: Basic User Interface
  7. * Programmer: Sean Landau
  8. * Program Description: Getting your name, age, gas mileage */
  9. {
  10. string age="";
  11. string name="";
  12. string input = "";
  13. double gmile=0;
  14.  
  15. DisplayApplicationInformation();
  16. DisplayDivider("Start Program");
  17. GetInput(ref input);
  18. GetAge(ref input);
  19. GetMileage();
  20. }
  21.  
  22.  
  23. private static void DisplayApplicationInformation()
  24. {
  25. Console.WriteLine("Welcome the Basic User Interface Program");
  26. Console.WriteLine("CIS247,Week 1 Ilab");
  27. Console.WriteLine("Solution");
  28. Console.WriteLine("This program accepts user input as a string, then makes the appropriate data conversion");
  29. }
  30.  
  31. private static void DisplayDivider(string outputTitle)
  32. {
  33. Console.WriteLine("********" + outputTitle + "********");
  34. }
  35.  
  36. public static string GetInput(ref string input)
  37. {
  38. DisplayDivider("get name");
  39. Console.Write("Your Name Is: ");
  40. Console.ReadLine();
  41. return input;
  42. }
  43.  
  44. public static string GetAge(ref string input)
  45. {
  46. DisplayDivider("get age");
  47. Console.Write("Your Age Is: ");
  48. Console.ReadLine();
  49. return input;
  50.  
  51. }
  52.  
  53. }
  54. }
Add Comment
Please, Sign In to add comment