No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
import java.util.Calendar; import java.io.*; public class DayOfYear { public static void main (String[] args) throws IOException { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader in = new BufferedReader(isr); System.out.print("Enter the date (yyyy,mm,dd): "); String date = in.readLine(); Calendar cal = Calendar.getInstance(); String[] seperate = date.split(","); int year = Integer.parseInt(seperate[0]); int month … |
|
/** A programme which converts weight from pounds to kilograms and the height from inches to centimeters, then it calculates body mass index. @author */ import java.util.Scanner; public class BodyMassIndex { public static void main(String[] args) { Scanner BMI = new Scanner(System.in); System.out.println(BMI.nextLine()); double p, k, c, i, bmi; Scanner … |