This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes add two numbers without using the plus operator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "add two numbers without using the plus operator" Watch "add two numbers without using the plus operator" New topic
Author

add two numbers without using the plus operator

lucky lsharma
Greenhorn

Joined: May 10, 2008
Posts: 11
Hi

can we write a program to add two numbers without using the plus operator.


regards
Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Test Code :


[ August 20, 2008: Message edited by: Ishu Saxena ]

--<br />SCJP 5.0
lucky lsharma
Greenhorn

Joined: May 10, 2008
Posts: 11
Hi Ishu ,

thanks for your kind reply , but its was not like that .(its worlds simplest answer). i need it in programming manner .

lots of thanks for your try .


regards
Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Okay, Here is another one ,




[ August 21, 2008: Message edited by: Ishu Saxena ]
lucky lsharma
Greenhorn

Joined: May 10, 2008
Posts: 11
hey ,

its will be great

so sending you some more question for you Ishu

1 program to generate the number in English. e.g. if input is 1,it should output one and so on till what ever may be upper limit say 1000.

2 program to swap two nibbles in a byte.

3 a program to convert from decimal to any base
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41048
    
  43
"lucky lucky",

apparently you missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.


Ping & DNS - my free Android networking tools app
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Originally posted by lucky lucky:
so sending you some more question for you Ishu
...

"Lucky", JavaRanch is not a place where you can have other people do your homework. Please do your own homework, otherwise you will not learn anything.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: add two numbers without using the plus operator
 
Similar Threads
1.5 Integer with +=
java
Shift operators
Adding numbers without +operator
how to add two numbers