وهذا حل السؤال الثاني ..
كود:
public static void main(String[] args) {
String name;
Scanner sc = new Scanner(System.in);
System.out.print("Please enter your name: ");
name = sc.nextLine();
System.out.print("Please enter the year of your birthday: ");
int year = sc.nextInt();
year = 2012 - year ;
System.out.print("Please enter the month of your birthday: ");
int month = sc.nextInt();
month = 11-month;
System.out.print("Please enter the day of your birthday: ");
int day = sc.nextInt();
day = 2 - day;
System.out.print("\nYour name is "+ name +". Your age is "+ year + " and " + month +" months and " + day+" days.");
}
بالتوفيق واي شي مو مفهوم انا جاهز للتفصيل..
اقصد للشرح