public static void Main() { var f = new Fizzy(); f.GetEntry(); }
// methods must have a return type public static void Main(string[] args) { // a user should be able to enter the starting and ending count // a user should be able to enter these values in any order // a user should be able to get the number of times fizz, buzz and fizzbuzz appear // a user should be able to set new values for fizz, buzz and fizzbuzz // var startPoint = 0; // var endPoint = 0; // Console.WriteLine("Please enter the first number"); // startPoint = Convert.ToInt32(Console.ReadLine()); // Console.WriteLine("Please enter the second number"); // endPoint = Convert.ToInt32(Console.ReadLine()); // Console.WriteLine("please enter a value for fizz"); // var fizz = Console.ReadLine(); // var fizzCount = 0; // Console.WriteLine("please enter a value for buzz"); // var buzz = Console.ReadLine(); // var buzzCount = 0; // Console.WriteLine("please enter a value for buzz"); // string fizzbuzz = "fizzbuzz"; // var fizzbuzzCount = 0; // if (startPoint > endPoint) // { // var temp = endPoint; // startPoint = temp; // } // for (int value = startPoint; value < endPoint; value++) // { // if (value % 3 == 0 && value % 5 == 0) // { // fizzCount++; // Console.WriteLine(fizzbuzz); // } // } var p = new Fizzy(); bool repeat = true; do { Console.WriteLine("enter a value for fizz, or press enter to exit"); p._fizz = p.getStringInput(); if (string.IsNullOrWhiteSpace(p._fizz)) { Console.WriteLine("exiting"); repeat = false; break; } Console.WriteLine("enter a value for buzz"); p._buzz = p.getStringInput(); Console.WriteLine("enter a value for fizzbuzz"); p._fizzbuzz = p.getStringInput(); p.GetEntry(); } while (repeat == true); }
public static void Main(string[] args) { var f = new Fizzy(); f.GetStartEnd(); }