-
-
Save folivetti/f41f4f5553185d5649ba372fcb76af79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) throws IOException { | |
int X, Y; | |
double total = 0.0; | |
Scanner sc = new Scanner(System.in); | |
X = sc.nextInt(); | |
Y = sc.nextInt(); | |
if (X==1) { | |
total = 4*Y; | |
} else if (X==2) { | |
total = 4.5*Y; | |
} else if (X==3) { | |
total = 5*Y; | |
} else if (X==4) { | |
total = 2*Y; | |
} else if (X==5) { | |
total = 1.5*Y; | |
} | |
System.out.printf("Total: R$ %.2f\n", total); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment