- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to perform Multiplication of Exponents of same base using C#?
Firstly, set the base.
double n = 2;
Now set the two exponents for division.
double e1 = 5; double e2 = 4;
Let us see the complete code to get the result of multiplication of exponents of the same base.
Example
using System; class Demo { static void Main() { double res, n, e1, e2; n = 2; e1 = 5; e2 = 4; res = e1 + e2; Console.WriteLine("Result = {0}^{1} : {2}", n, res, Math.Pow(n, res)); Console.ReadLine(); } }
Output
Result = 2^9 : 512
Advertisements