Computer Science, asked by Tonyrohan5555, 2 months ago

Write the Java statement
To find R raised to the power 1/5.​

Answers

Answered by INCOGNITO989889
0

Answer:

Using Standard Method

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

import java.util.Scanner;

{

 public static void main(String arg[])

 {

   int n=5,p=3,result=1;

   if(n>=0&&p==0)

    {

       result=1;

    }

   else if(n==0&&p>=1)

     {

        result=0;

     }

   else

    {

        for(int i=1;i<=p;i++)

 {

           result=result*n;

  }    

    }

   System.out.println(n+"^"+p+"="+result);

Similar questions