public static void main(String[]args){
int a=10;
double b=10;
double c=5.678;
double e=10/3;
double f=10.0/3.0;
System.out.println("a="+a);
System.out.println("b="+b);
System.out.println("c="+c);
System.out.println("e="+e);
System.out.println("f="+f);
// double f1=10.0/3; double f2=10/3.0;
double f3=10/3;
double f4=10.0/3.0;
System.out.println("f1="+f1);
System.out.println("f2="+f2);
System.out.println("f3="+f3);
System.out.println("f4="+f4);
}
}
网友评论