Skip to content

Instantly share code, notes, and snippets.

@folivetti
Created February 17, 2017 13:28
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/0027ad82e2fa37a56a610c067943f77d to your computer and use it in GitHub Desktop.
Save folivetti/0027ad82e2fa37a56a610c067943f77d to your computer and use it in GitHub Desktop.
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
double A, B, C, media;
Scanner sc = new Scanner(System.in);
A = sc.nextDouble();
B = sc.nextDouble();
C = sc.nextDouble();
media = (2*A + 3*B + 5*C)/10;
System.out.printf("MEDIA = %.1f\n", media);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment