Can any one solve this code for me? I want it to give desired output on single required input, will any one help me?
import java.util.Scanner; class Myage { public static void main(String[] args) { int a=12; int b=13; int c=7; { { String d, e; d="Months"; e="Years"; { System.out.println("I am " + (a+b)+" "+e+" & "+c+" "+d+" old. What about you"); { Scanner yes = new Scanner(System.in); //declaring new scanner with name myVar System.out.println("Can I know your Age:"); System.out.println("She: "+yes.nextInt()); { if(yes.nextInt()>18 && yes.nextInt()<=26) { System.out.println(" Right age to get married") ; }else if(yes.nextInt() <18) { System.out.println(" you are still a kid") ; } else if(yes.nextInt() >26) { System.out.println("Sorry you should have contacted us earlier") ; } } } } } } } } } https://code