import java.util.Scanner;
public class DogYears
{
public static void main (String[] args)
{
Scanner stuff = new Scanner (System.in);
System.out.print ("What is your name? ");
String text = stuff.nextLine ();
System.out.print ("How old are you? ");
int age = stuff.nextInt ();
System.out.println ("Wow, " +text+ "if you were a dog, you'd be " +(age*7)+ "!");
}
}
public class DogYears
{
public static void main (String[] args)
{
Scanner stuff = new Scanner (System.in);
System.out.print ("What is your name? ");
String text = stuff.nextLine ();
System.out.print ("How old are you? ");
int age = stuff.nextInt ();
System.out.println ("Wow, " +text+ "if you were a dog, you'd be " +(age*7)+ "!");
}
}
(0) Comments
Post a Comment