gpt4 book ai didi

java - 我收到错误 :cannot find symbol when compiling

转载 作者:行者123 更新时间:2023-11-30 06:21:02 25 4
gpt4 key购买 nike

<分区>

我正在尝试使用 IF 语句进行计算和舍入,代码如下。错误来了:if (partterms < 6)

   // Setup Array List for Course CU
ArrayList<Double> coursecu = new ArrayList<Double>();
// Read inputs for Course Units and Sum the Value
System.out.println("Please enter Individual Course CU values, Q to quit:");
Scanner in2 = new Scanner(System.in);
while (in.hasNextDouble())
{
coursecu.add(in.nextDouble());
}
double sum = 0;
for(int i = 0; i < coursecu.size(); i++)
{
sum = sum + coursecu.get(i);
}
System.out.println();
System.out.println("Total Credit Units Required for Graduation");
System.out.println(sum);
// Calculate the Number of Terms to Completion
{
double fullterm = sum / planned_units; // Sets Whole Terms
double partterm = sum % planned_units; // Sets Partial Terms
}
if (partterm < 6)
{
number_terms = fullterms++;
}
else
{
number_terms = fullterms;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com