public class AverageFruit {
public static void main(String[] args) {
// Declare and initialize three variables
double numOranges = 50.0E-1; // Initial value is 5.0
double numApples = 1.0E1; // Initial value is 10.0
double averageFruit = 0.0;
averageFruit = (numOranges + numApples)/2.0;
System.out.println(“A totally fruity program”);
System.out.println(“Average fruit is “ + averageFruit);
}
}
NO.3JAVA
Oct252006
KARPAR
Subscribe to:
Post Comments (Atom)
0 评论: (+add yours?)
Post a Comment