GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Programming  >  Java

 Print  |  
Question:  Adding Two Numbers

Answer: How to add two numbers without using arithmetic operators?


August 08, 2008 18:21:32 #1
 antony75   Member Since: July 2006    Total Comments: 1 

RE: Adding Two Numbers
 

int firstnumber = 1
int secondno =2

for(int count =0;count<secondno;count++)
{
       firstnumber++;
System.out.println(firstnumber);
}


     

 

Back To Question