Computer Science, asked by ziaaqsa9, 8 months ago

Write a program which takes x as input from user, and displays the output using following formula:
Assume a=5, b=7, c=3, d=8.
ax3 + bx2 + cx + d​

Answers

Answered by bhartiya06
0

Answer:

public class formula

{

public static void main()

{

int a=5,b=7,c=3,d=8,e;

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

x=in.nextInt();

e=(a*x*3)+(b*x*2)+(c*x)+d;

}

System.out.print(e);

}

Similar questions