Hello all,
I am relatively new and need some help with this. It is not allowing me to have two separate inputs. Enter "Name" and "Date". It for some reason is showing up on the same line.
Thanks for the help
package javaapplication7; import java.util.Scanner; /** * * @author Onlyname */ public class JavaApplication7 { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner scan = new Scanner(System.in); // Input for name System.out.print("Name: "); String Name=""; // Input for Date System.out.print("Date: "); String Date=""; int number = scan.nextInt(); // Roman variable assignment String roman=""; if (number<=1900 || number>2100) { System.out.println("Invalid. You must enter numbers between 1900 & 2100"); System.out.println("Enter another number now: "); } while (number>=1000){ roman +="M"; number-=1000; } while(number>=900){ roman += "CM"; number-=900; } while (number>=500){ roman += "D"; number-=500; } while (number>=100){ roman += "C"; number-=100; } while (number>=50){ roman += "L"; number-=50; } while (number>=10){ roman += "X"; number-=10; } while (number>=5){ roman += "V"; number-=5; } while (number>=1){ roman += "I"; number-=1; } return Name + roman; } }