Computer Science, asked by xiyabkhan90, 1 month ago

For the following equation 3x4 + 4x3 + x2 + 7x + 9, take the value of x from the user and generate the result

Answers

Answered by Subedarjuber
0

Answer:

sorry mera maths bada kharab he

Answered by dreamrob
0

Program :

import java.util.*;

public class MyClass

{

   public static void main(String args[])

   {

       Scanner Sc = new Scanner(System.in);

       int x , Ans ;

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

       x = Sc.nextInt();

       Ans = 3 * (int)Math.pow(x , 4) + 4 * (int)Math.pow(x , 3) + (int)Math.pow(x , 2) + 7 * x + 9;

       System.out.print("For x = " + x + " result is " + Ans);

   }

}

Output :

Enter a value : 2

For x = 2 result is 107

Similar questions