Computer Science, asked by preeti998, 9 months ago

Write the Java expression for the following
q=1/root (a +b) +3/c²

Answers

Answered by prashantrohilla32
5

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {                            

    Scanner sc=new Scanner(System.in);

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

        int a=sc.nextInt();

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

        int b=sc.nextInt();

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

        int c=sc.nextInt();

        int c2=c*c;

        int root=(int)Math.sqrt(a+b);

        int c3=3/c2;

        int q=(root+c3);

        System.out.println("q = 1/"+q);

}

}

Explanation:

Attachments:
Answered by pbguardian07
0

Answer:

h

Explanation:

Similar questions