Nth root with user input
In this, we are going to  find nth root of a number with the help of C program.

#include <stdio.h>
#include <math.h>

int main()
{
    int num,root;
    double result;

    printf("Enter the number to find nth root: ");
    scanf("%d",&num);

    printf("Enter the nth root: ");
    scanf("%d",&root);
    result = pow(num, 1.0/root);

    printf("%d th root of %d = %d ^ 1/%d  = %lf",root,num,num,root,result);
    return 0;
}

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post