Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


md farooq
addition
1 Answer(s)      3 years and 10 months ago
Posted in : Java Beginners


write a program to add two numbers without using variables


Advertisement
View Answers

February 22, 2011 at 12:12 PM


Java add two numbers

import java.math.*;
class AddNumbers 
{
    public static void main(String[] args) 
    {
        BigInteger num1=new BigInteger("100");
        BigInteger num2=new BigInteger("50");
        BigInteger result=num1.add(num2);
        System.out.println(result);
    }
}


Related Tutorials/Questions & Answers:
Addition of JComboBoxItem
Addition of JComboBoxItem  how to add JComboBoxItem cb1=1,cb2=1/9 into a JTextField. thanks
Advertisements
Addition of two numbers
Addition of two numbers  addition of two numbers
Matrix Addition using RMI in Java
Matrix Addition using RMI in Java  Source Code for Matrix Addition using RMI in Java
MySQL Addition
MySQL Addition       MySQL Addition returns you the sum value of a specific column for a group in a table. The Aggregate function sum() is used to perform the addition in SQL
MySQL Addition
MySQL Addition       MySQL Addition returns you the sum value of the total counts in a table... The Tutorial illustrate an example from 'MySQL Addition'. To understand the example
Preprocessor directive case for multiplication and addition
Preprocessor directive case for multiplication and addition  Preprocessor directive case for multiplication and addition include<stdio.h> define m 2+10 include<conio.h> int main() { int i; clrscr
Addition to my previous post - Java Beginners
Addition to my previous post  Addition to my previous question about the address book program. I need to have separate classes: CmdLineAddressBook.java AddressBook.java Contact.java Address.java Name.java
PHP Addition of Array
PHP Addition an Array to Another Array In this PHP beginners tutorial we will study to add an array into another array, don't be confused with array merge and addition of arrays, given example will clear the confusion, in the given
binary addition,subtraction and modulus operations - Java Beginners
binary addition,subtraction and modulus operations  i wanna perform binary addition,subtraction and modulus operation between two numbers of 512 bit... passed as string into binary form, and then perform addition,subtraction and modulus
How to make addition of two combobox values using jsp and javascript?
addition of two combobox values using jsp and javascript  How to make addition of two combobox values using jsp and javascript?  <html> <h2>ComboBox</h2> <script language="javascript"> var arr
Show Addition, Subtraction, Intersection, Exclusive OR on one frame
Show Addition, Subtraction, Intersection, Exclusive OR on one frame       This section illustrates you how to show Addition, Subtraction, Intersection, ExclusiveOR on one frame
Show Addition, Subtraction, Intersection, Exclusive OR on one Frame
Show Addition, Subtraction, Intersection, Exclusive OR on one Frame       This section illustrates you how to show Addition, Subtraction, Intersection, ExclusiveOR on one
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........  code for a simple java program which performs basic arithmetic operation addition,subtraction
how to calculate addition of two distances in feets and inches using objects as functions arguments
how to calculate addition of two distances in feets and inches using objects as functions arguments  how to calculate addition of two distances in feets and inches using objects as functions arguments in java
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java   
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java   
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java   
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Shop and win campaign drive web project in strictly HTML in addition to PHP languages only.(it should have both languages)
Shop and win campaign drive web project in strictly HTML in addition to PHP languages only.(it should have both languages)  Shop N win campaign drive web project. Prime shoppers Ltd a leading shopping center is running
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??  import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class add1 extends MIDlet implements
Matrix addition in java
Matrix addition in java In this section we will learn about addition of two...-dimensional array. Here we are going to develop a Java code for matrices addition... } } System.out.println("After addition of the two matrices:-"
Java Matrix Addition Example
Java Matrix Addition Example In this tutorial, you will learn how to find...;); } } System.out.println(); System.out.println(); System.out.println("Addition... 2 3 4 5 6 2 1 3 Matrix B: 5 2 3 5 5 1 2 2 5 Addition Of Matrices
Addition of two Number in Class
Addition of two Numbers in Class       In this program we will learn how to calculate...; we are going to use addition of  two number. First of all, we have
C Addition of two matrices
C Addition of two matrices In this section, we are going to calculate the sum...; printf("\nThe Addition of two matrix is:\n");  ... The Second matrix is: 5 6 7 8 The Addition of two matrix is: 6
Advertisements
 

 

 

DMCA.com