Import java.util.Scanner;

    public class Exercicio3 {
        public static void main(String[] args) {

            Scanner sc = new Scanner(System.in);
            int codigo = sc.nextInt();
            int quantia = sc.nextInt();
            double total;

            Switch (codigo) {
                case 1: total = quantia * 4,00; break;
                case 2: total = quantia * 4,50; break;
                case 3: total = quantia * 5,00; break;
                case 4: total = quantia * 2,00; break;
                case 5: total = quantia * 1,50; break
                default: total = 0;   
            }  
            System.ou.println(String.format("Total: R$ %.2f", total));
        }
    }

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: