C# Program to Find the Division of Exponents of the Same Base

Everyone has every option I have C# Program to Find the Division of Exponents of the Same Base I have the option to write this article. I am writing this article to resolve your doubts. We ask that you understand this article well.

C# Program to Find the Division of Exponents of the Same Base

C# Program to Find the Division of Exponents of the Same Base

//Program to find the division of 
//exponents of the same base in C#

using System;

class ExpDemo
{
    static void Main()
    {
        double Base         = 0.0;
        double Exponent1    = 0.0;
        double Exponent2    = 0.0;
        double Division     = 0.0;
        double Result       = 0.0;

        Console.Write("Enter the value of base : ");
        Base = double.Parse(Console.ReadLine());
        
        Console.Write("Enter the value of first exponent :");
        Exponent1 = double.Parse(Console.ReadLine());

        Console.Write("Enter the value of second exponent :");
        Exponent2 = double.Parse(Console.ReadLine());
        
        Division = Exponent1 - Exponent2;
        Result = Math.Pow(Base, Division);

        Console.WriteLine("Result is : {0}^{1} : {2}", Base, Division, Result);
    }
}
Enter the value of base : 3
Enter the value of first exponent :5
Enter the value of second exponent :3
Result is : 3^2 : 9
Press any key to continue . . .

Final Words

We hope the C# Program to Find the Division of Exponents of the Same Base article fills your doubts. And let us know if you have any doubts. We resolve your doubts Thank you.

Hi, I'm Selva a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment