• Home
  • Piracy & Policy
  • Disclaimer
  • Terms
  • About
  • Contact Us

Saroj Baniya

  • Home
  • Services
  • Blog
  • Contact
  • About Blog
  • _Terms & Conditions
  • _Piracy & Policy
  • _Disclaimer
  • _Contact
  • _About Us

Write a C Program to Find mn where m and n are Integers and Value of n be Negative and 0

Saroj July 12, 2022

In this tutorial learn how you can write a c program to find mn. Where m and n are integers and consider the value of n be negative and 0 which is given by user.

We are using <math.h> header and pow() function for this tutorial.

C programming is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, etc.


write c program to find mn where m and n are integers and value of n be negative and 0




Write a Program to Find mn where m and n are Integers and Value of n be Negative and 0

Here is the code to find mn. Where m and n are integers and consider the value of n be negative and 0 which is given by user. in C programming.

#include <stdio.h> //WAP to find mn. Where m and n are integers and consider the value of n be negative and 0 which is given by user.
#include <math.h>
int main()
{
    double m, n, mn;
    printf("Enter the base:");
    scanf("%lf", &m);
    printf("Enter the exponent value negative or 0:");
    scanf("%lf", &n);
    mn = pow(m, n);
    printf("The value of mn is %.2lf.", mn);
    return 0;
}

Test Live At Jdoodle



Conclusion

This is how you can find mn. Where m and n are integers and consider the value of n be negative and 0 which is given by user. in c programming. Comment below if you like our tutorial.

C C Codes C programming Codes Coding How To Tutorial WAP

You may like these posts

0 Comments

Newer Older

Popular Posts

C Programming

3/C%20programming/post-list

Categories

  • Blogger 2
  • C programming 39

Tags

  • add smooth scrolling effect for blogger
  • add table in blogger post
  • Blogger
  • Blogger-Tricks
  • C
  • C Codes
  • C programming
  • Codes
  • Coding
  • How To
  • Tutorial
  • WAP

Search This Blog

Contact Info

I am live on these platform.Thus,you can contact me on the contact below.

Contact List

Facebook: facebook.com/saroj.baniya.3382
Mail: rosesaw20@gmail.com
Phone: +9779818434496

Contact Form

ReCreated By ©Copyright2022 Saroj Baniya
Created By SoraTemplates