Skip to content

Instantly share code, notes, and snippets.

@folivetti
Created March 5, 2017 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save folivetti/9b3e58c2c1eeb6f70e63988708d7dac8 to your computer and use it in GitHub Desktop.
Save folivetti/9b3e58c2c1eeb6f70e63988708d7dac8 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
class Main {
public static void main(String[] args) {
double a, b, c, x, resultado;
Scanner leitor = new Scanner(System.in);
a = leitor.nextDouble();
b = leitor.nextDouble();
c = leitor.nextDouble();
x = leitor.nextDouble();
resultado = a*x*x + b*x + c;
System.out.println(resultado);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment