我不断收到关于double h= (19*a + b – d – g + 15)%30;
删除 d - g 的语法错误?
import javax.swing.JOptionPane;
public class mathpowers {
public static void main(String[] args) {
String yearString =
JOptionPane.showInputDialog("Enter a year");
double y = Double.parseDouble(yearString);
double a=y%19;
double b=y/100;
double c=y%100;
double g = Math.round((8*b + 13)/25);
double h= (19*a + b – d – g + 15)%30;
double j= c/4;
double k = c%4;
int m = (a + 11*h)/319;
double r = (2*e + 2*j-k-h+m+32)%7;
double n=(h-m +r+90)/25;
double p=(h – m + r + n + 19)%32;