我是编码新手,我不断收到关于标记“.”的语法错误,; 在第 21、22 和 23 行(System.out.println)。我可以弄清楚我们正是错误是?
// calculator for the price of milk
import java.util.Scanner;
public class DairyCalculator
{
public static void main( String [] args)
{
double cartonhold = 3.78;
double productioncost = 0.38;
double cartonprofit = 0.27;
Scanner sc = new Scanner(System.in);
System.out.print( "Enter how many liters of milk was produced; "); // input
double produced = sc.nextInt();
double cartonsneeded = produced / cartonhold;
int System.out.println( "Milk cartons needed" = cartonsneeded);
double System.out.println("Cost of production" = produced * productioncost);
double System.out.println("Profit" = produced * cartonprofit);
sc.close();
}
}
繁花不似锦
鸿蒙传说
相关分类