Написать программу которая принимает 3 числа(2 целых чисел x,y и одно действительное число z). Вычислить следушюю формулу и сравнить ее результат с z.〖(〖(x+y)〗^2/(〖(√(2&x^2+y^2 ))〗^3+〖(x+y)〗^2+1))〗^3. Если окажется z больше, то вывести квадрат z, если ровны то вывести саму z, если z меньше то вывести корень z.

Egor456803 Egor456803    1   20.05.2021 19:28    7

Ответы
demianchik demianchik  19.06.2021 19:30

Язык — Java

Очевидно, что я пишу не на том языке, на каком надо, ведь ты не отметил нужный.

Но если ты попросишь, может мне и будет хватать сил писать псевдокод :D

import java.util.Scanner;

public class Znanija {

   public static void main(String args[]) {

     double x, y, z;

     double real, denominator, numerator, numerator1, fraction;

     Scanner input = new Scanner(System.in);

     

     System.out.println("Enter the value of \"x\": ");

     

     x = input.nextInt();

     

     System.out.println("\nEnter the value of \"y\": ");

     y = input.nextInt();

     

     System.out.println("Input the value of \"z\": ");

     z = input.nextInt();

     

     denominator = Math.pow(x+y, 6);

     numerator = Math.pow((Math.pow((Math.sqrt(((x*x)+(y*y, 1.71)), 3);

     

     numerator1 = numerator+(Math.pow(x+y, 2)+1);

     

     fraction = denominator/numerator;

     

     if (z > fraction) {

         System.out.println("\nThe value of \"z\" is greater, then the equation, so here's the result: " + Math.pow(z, 2));

     }  

     else if (z == fraction)  {

         System.out.println("\nThe values of both variables are equal, so here's the result: " + z);

     }  

     else {

         System.out.println("\nThe value of \"z\" is lees then the eqation, so here's the result: " + Math.sqrt(z));

     }

     

   }

}

ПОКАЗАТЬ ОТВЕТЫ
Другие вопросы по теме Информатика