Computer Science, asked by Rohan200618, 1 month ago

Write a program to input the values of a,b,c and find the value of x where x= √(a^9 b^6 c^5) in bluej

Answers

Answered by anindyaadhikari13
4

\texttt{\textsf{\large{\underline{Solution}:}}}

The given problem is solved using language - Java.

import java.util.*;

public class Evaluation{

   public static void main(String args[]){

       Scanner sc=new Scanner(System.in);

       int a,b,c;

       double x;

       System.out.print("Enter a: ");

       a=sc.nextInt();

       System.out.print("Enter b: ");

       b=sc.nextInt();

       System.out.print("Enter c: ");

       c=sc.nextInt();

       sc.close();

       x=Math.sqrt(Math.pow(a,9)*Math.pow(b,6)*Math.pow(c,5));

       System.out.println("The value of x: "+x);

   }

}

\texttt{\textsf{\large{\underline{Logic}:}}}

  • Accept the values of a,b and c from the user.
  • Calculate x using the given formula.
  • Display the value of x using println() statement.

See the attachment for output.

Attachments:
Similar questions