Java问题求助
package test;import java.util.Scanner;
public class test1 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int []s = new int;
for(int i =0;i<s.length;i++) {
s = sc.nextInt();
}
double c = sc.nextDouble();
double s1 = s+s/60+c/3600;
System.out.print("30°41′52.37"+" = ");
System.out.printf("%.6f",s1);
sc.close();
}
}
我这s为啥没数呢,求指点~
for循环那里要输两次数字 要好好想想啊 发表于 2022-6-29 15:45
for循环那里要输两次数字
这个是对的,哈哈
页:
[1]