aszxcv
December 27th, 2008, 01:40 AM
public class math {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int x = (int) Math.PI * 20.0;
System.out.println(x);
}
}
found : double
required: int
int x = (int) Math.PI * 20.0;
1 error
BUILD FAILED (total time: 0 seconds)
the code is suppose to round math pi to 3 and then multiple by 20 and produce the answer 60. but i keep getting the error above when i try to build this project:confused:
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int x = (int) Math.PI * 20.0;
System.out.println(x);
}
}
found : double
required: int
int x = (int) Math.PI * 20.0;
1 error
BUILD FAILED (total time: 0 seconds)
the code is suppose to round math pi to 3 and then multiple by 20 and produce the answer 60. but i keep getting the error above when i try to build this project:confused: