noob - NEED HELP!
hi
im new to java and im writing a simple program, but the arithmetic is just too confusing!
i have to write a program that asks a user for their birth year encoded as two digits (like "62") and for the current year, also encoded as two digits (like "99"). The program is to correctly write out the users age in years.
ive got this far:
import java.io.*;
class ProblemDetector
{
public static void main (String[] args) throws IOException
{
BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
String inData, inData1;
int yOB, year, age;
System.out.println ("What is your Year of Birth?");
inData = stdin.readLine();
yOB = Integer.parseInt (inData);
System.out.println ("What is the current year (yy)");
inData1 = stdin.readLine();
year = Integer.parseInt (inData1);
if ( )
age = ( );
else
age = ( );
System.out.println ("You are "+age+" years old");
}
}
the confusing part is you enter 00 as a year or year of birth.
any help would be great

