I'm new to C# and won't lie, I'm finding it rather hard after not coding for a couple of years (previous experience being Python and HTML). My first assignment for the Computer Science degree I've just embarked upon is FizzBuzz which although is generally easy as it would appear with a google, it's also got some extra bools and intergers thrown in which I'm not entirely sure what to do with.
If anybody can point me in the right direction with my code it'd be greatly appreciated.
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- {
- namespace Fizzbuzz
- {
- class Program
- static void Main(string[] args)
- {
- for (int i = 1; i <= 100; i++)
- if (i % 3 == 0) Console.Write("Fizz");
- if (i % 5 == 0) Console.Write("Buzz");
- if (Console.CursorLeft == 0) Console.Write(i);
- if (i)
- {
- public bool IsFizz(int input);
- public bool IsBuzz(int input);
- public bool IsFizzBuzz(int input);
- public bool IsPrime(int input);
- }
- {
- public void BeginTesting()
- public int TotalFizz()
- public int TotalBuzz()
- public int TotalFizzBuzz()
- public int TotalPrime()
- }
- Console.WriteLine();
- Console.ReadLine();
- }
- }
- }