Project 0

IT by Phil

C# Code

using System;

class ABBA
{
    static int Factorial(int n)
    {
        if (n == 1) return 1;
        return n * Factorial(n - 1);
    }

    static void Main(string[] args)
    {
        Console.WriteLine("ABBA!");
        Console.Write("Enter number of vowels: ");
        int vowels = int.Parse(Console.ReadLine());

        Console.Write("Enter number of consonants: ");
        int consonants = int.Parse(Console.ReadLine());

        Console.WriteLine(Factorial(vowels) * Factorial(consonants));
    }
}
      
← Back to Home
Web hosting by Somee.com