Computer Science, asked by noorfathima9035, 19 days ago

2. Write a program to input values of x, y and z. Calculate and print the result of the following expression by making use of mathematical methods : 3 S= va+ b3 + c 2​

Answers

Answered by rahulranganaths
0

Answer:

This is suing JAVA programming language

Explanation:

import java.util.Scanner;

public class KboatExpression

{

   public static void main(String args[]) {

       

       Scanner in = new Scanner(System.in);

       

       System.out.print("Enter the value of a: ");

       int a = in.nextInt();

       

       System.out.print("Enter the value of b: ");

       int b = in.nextInt();

       

       System.out.print("Enter the value of c: ");

       int c = in.nextInt();

       

       double exp = (1 / Math.pow(a, 2)) + (2 / Math.pow(b, 2)) + (3 / Math.pow(c, 2));

       long roundedExp = Math.round(exp);

       

       System.out.println("Result rounded to whole number: " + roundedExp);

   }

}

Answered by AyushmaanSingh2011
0

Answer:

public class calculate

{

void root()

{

int a = 5;

int b = 6;

int c = 3;

double S = 0.0d;

S = Math.sqrt(a*a*a + b*b*b + c*c*c);

System.out.println(" Square root = " + 5);

}

}

Request:

Pls mark me as a brainlist!!

Similar questions