Home Discussion Discuss: Comparing Two Numbers

  • COMMENTWycliffe June 13, 2011 at 11:27 PM

    your program is quite satisfying but would be better if a constructor was used

  • CaZoItrkGFsmjLNFChamomile July 3, 2011 at 3:19 AM

    Hey, youÂ?re the goto expert. Thanks for hanigng out here.

  • JAVA LEARNINGASISH SAMUEL ABRAHAM October 11, 2011 at 11:06 AM

    WANT TO LEARN JAVA

  • java comparing using iftargus February 24, 2012 at 10:29 AM

    I've been trying the above example and i've been trying to make it work but why there's an error with the If statement?

  • javaGamer March 16, 2012 at 12:24 PM

    i m loving it.

  • Even and Odd Program MD AKTARUZZAMAN June 28, 2012 at 1:16 AM

    import java.io.*; public class InpupOutput { /** * @param args */ public static void main(String[] args) { try{ System.out.println("Press Any Number for Output Even and even"); BufferedReader a =new BufferedReader(new InputStreamReader(System.in)); int nub=Integer.parseInt(a.readLine()); System.out.print("Even="); for(int i=1;i<=nub;i++) { if(i%2==0) { System.out.print(i+","); } } System.out.println(); System.out.print("Odd="); for(int k=1;k<=nub;k++) { if(k%2!=0) { System.out.print(k+","); } } } catch (Exception e) { } } }

  • COmputersAmit Kumar July 18, 2012 at 1:23 PM

    I M a Teacher at KV.

  • javaragupathy August 8, 2012 at 1:56 PM

    program as run in page get the answer

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
DMCA.com