Home Answers Viewqa Java-Beginners multiply of 100 digits numbers

 
 


jitendra chaudhary
multiply of 100 digits numbers
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners

multiplying 100 digits numbers to eachother

View Answers

January 12, 2011 at 3:43 PM


Hi Friend,

Try this:

import java.math.*;
import java.util.*;
class ProductOfDigits{
        public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        System.out.print("Enter Number: ");
        BigInteger bi=input.nextBigInteger();
        String strSum = bi.toString();
        BigInteger num=new BigInteger("1");
        for(int i = 0;i < strSum.length(); i++){
        char ch=strSum.charAt(i);
        num=num.multiply(new BigInteger(Character.toString(ch)));
        }
        System.out.println(num);
        }
}

Thanks









Related Pages:
multiply of 100 digits numbers
multiply of 100 digits numbers  multiplying 100 digits numbers to eachother
print 100 numbers using loops
print 100 numbers using loops  how to print from 1 to 100 using...{ public static void main(String[] args){ for(int i=1;i<=100;i...[] args){ for(int i=1;i<=100;i++){ System.out.println(i
Mysql Multiply
Mysql Multiply       Mysql Multiply is used to define the product of any two or more numbers... Multiply'. The example elaborate a query that help you to return the product of any
Mysql Multiply
Mysql Multiply       Mysql Multiply is used to define the product of any two or more numbers... Multiply'.The example elaborate a query that help you to return the product
Numbers
Java NotesNumbers Two kinds of numbers. There are basically two kinds of numbers in Java and most other programming languages: binary integers (most commonly using the type int) and binary floating-point numbers (most commonly using
Java bigdecimal multiply method example
Java bigdecimal multiply method example   ... multiply method example. Method returns a bigdecimal object value. Method... for using the method : public BigDecimal multiply(BigDecimal multiplicand
Ajax Multiply Two Values
to multiply two values and display the result on the page. This program calls.... The 'callmultiply()' sends the numbers as url string by calling the 'postRequest...;html>    <head>   <title>Ajax Multiply
Hexadecimal numbers multiplication
Hexadecimal numbers multiplication  Sir, I have to multiply 128 bit hexadecimal numbers. Do u have any logic for this?? The numbers are like ab7564fa342b5412c34d9e67ab341b58
odd numbers with loop
odd numbers with loop  get the odd numbers till 100 with for,while loop   Java find odd numbers: class OddNumbers { public static void main(String[] args) { for(int i=1;i<=100;i
simple javascript validation for numbers
number.input 10 digits number!"); return false; } </script> <
numbers - Java Beginners
numbers  Write a program to create a file named "numbers.dat". Then create an algorithm that adds all even numbered integers from 1 to 100, separated... the odd number integers from 1 to 100, separated by a comma to the end of the file
Convert Roman Numbers to Decimal Numbers
Convert Roman Numbers to Decimal Numbers In the previous section, we have illustrated the conversion of Decimal Numbers to Roman. Here we are doing vice...': decimal += 100; break; case 'L': decimal += 50; break
java program_big digits multiplication..
java program_big digits multiplication..  i want program about big digits multiplication program using java..plz tel me answer
generate random numbers and display the largest
generate random numbers and display the largest  Hi, I am using netbeans so if someone could help me with an answer in that form i'd appreciate...; i++){ array[i] = r.nextInt(100) + 1; } int max = array[0
print the even numbers between the range 100-200
prints out the even numbers between the range of 100 and 200 and then determine... the even numbers between 100 and 200. class EvenNumbers { public static...("Even Numbers between 100 and 200"); for(int i=100;i<=200;i
Assigning ordinate numbers - JSP-Servlet
ordinalNo(int value) { int hunRem = value % 100; int tenRem = value % 10... String ordinalNo(int value) { int hunRem = value % 100; int tenRem = value...(); int num=r.nextInt(100); System.out.println(num); String st
Implementing Digits restriction Using JQuery
Implementing Digits restriction Using JQuery  Hi Sir I have following field in my html form : <div>Age<input type="text" name="quantity...("&nbsp;&nbsp;Digits Only").show(); return false
adding two numbers with out using any operator
adding two numbers with out using any operator  how to add two numbers with out using any operator   import java.math.*; class AddNumbers... BigInteger("100"); BigInteger num2=new BigInteger("50
PHP Numbers Variables
PHP Variables Numbers We already define that variables are used to store the values or information in the form text strings, numbers or array. A variable... you can used again and again.  You can also assign numbers in PHP variable
Program to display palindrome numbers between some range
Program to display palindrome numbers between some range  Hi!I want a java program to display palindrome numbers between 100 to 1000.can you please...(){ for (int i=100; i<=1000; i++){ Integer in=new Integer(i
write an application that print out the even numbers between the range 100-200
write an application that print out the even numbers between the range 100-200   write an application that print out the even numbers between the range 100-200 ?   The given code accepts the number from 100 to 200
Find Twin Primes Number using Java
primes and twin primes from the first 100 natural numbers. For this, we have used.... As you already know, prime numbers are the numbers which can only  be divided... are the pair of prime numbers which are having a difference of 2 between two
print the sum of even number from 1 to 100
print the sum of even number from 1 to 100  how to print the sum of even number from 1 to 100 using for loops? Thanks
Java bigdecimal multiply example
Java bigdecimal multiply example       Example below demonstrates bigdecimal class multiply... BigDecimal multiply(BigDecimal multiplicand) BigDecimal objects with names x ,y
Calculate sum of even and odd numbers in Java
Calculate sum of even and odd numbers In this section, you will learn how to read the file that contains even and odd numbers and calculate their sum separately. To do this, first of all, we have found all the even and odd numbers from 1
Java Matrix Multiplication Example
Java Matrix Multiplication Example In this tutorial, you will learn how to multiply two matrices. Like mathematical operations of two numbers, you can perform these operations on matrices too. Here we are going to calculate
Multiply a range of array elements using Recursion
Multiply a range of array elements using Recursion In this section you will learn how to use recursion to multiply a range of array elements. For this we have created a method rangeMult() that takes three arguments: an int array
automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link: Automorphic numbers Thanks
sorting numbers
sorting numbers  How to sort the numbers in ascending order   import java.util.*; class SortNumbers{ public static void main(String...=input.nextInt(); list.add(num); } System.out.println("Numbers
Prime Numbers
Prime Numbers  Create a complete Java program that allows the user to enter a positive integer n, and which then creates and populates an int array with the first n prime numbers. Your program should then display the contents
JavaScript toPrecision method
into the number with the number of digits as provided for the precision. Syntax:  number_object.toPrevent( digits); Where number_object is the number at which we have to apply method toPrecision() and digits are the number
Numbers pyramid
Numbers pyramid  Hi sir, Can you please tell me how to output this using nested for loops? 1 2, 1 1, 2, 3 4, 3, 2, 1 1, 2, 3, 4, 5 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7 8, 7, 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 9, 8
Rational Numbers
Rational Numbers   Write and fully test a class that represents rational numbers. A rational number can be represented as the ratio of two integer values, a and b, where b is not zero. The class has attributes for the numerator
Write a C language program to read two matrices and multiply them?
Write a C language program to read two matrices and multiply them?  Write a C language program to read two matrices and multiply them?   ... = 0; int first[10][10], second[10][10], multiply[10][10]; printf("Enter
Converting Numbers to Strings
Java: Converting Numbers to Strings Vanilla Java: Converting numbers... control over the formating of numbers (number of decimal places, scientific... Precision. The problem with floating-point numbers by concatenation
Java Sum of Digits
Java Sum of Digits In this Java Tutorial section, you will learn how to find.... Following code calculates the sum of digits: while (n > 0) { int p... for Sum of Digits in Java: import java.util.*; class SumOfDigits { public
Floating-point
Java NotesFloating-point Floating-point numbers are like real numbers...-point numbers: float and double, both stored in IEEE-754 format. The default type... approximatein decimal digits float 432 +/- 3.4 * 10386-7 double864
Addition of two numbers
Addition of two numbers  addition of two numbers
Calculator program in Java
). If the user enters a "*" operator it will multiply the two numbers...Calculator program in Java is used by programmer to add, subtract, multiply or divide two integer numbers that are input by system. In the given example
defining numbers in Java Script
defining numbers in Java Script  Explain about defining numbers in Java Script
Write a function that reads a string of digits, possibly preceded by + or -, and converts this string to the integer value it represents.
Write a function that reads a string of digits, possibly preceded by + or -, and converts this string to the integer value it represents.  Write a function that reads a string of digits, possibly preceded by + or -, and converts
numbers divisible by 5 and 6
numbers divisible by 5 and 6  Find the first ten numbers which are greater than Long.MAX_VALUE divisible by 5 and 6
prime numbers - Java Beginners
prime numbers  Write a java program to find the prime numbers between n and m
Adding two numbers
Adding two numbers  Accepting value ffrom the keyboard and adding two numbers
Random numbers - Introduction
Java NotesRandom numbers - Introduction When to use random numbers There are many types of programs that use random numbers. Game programs use them... numbers. You might want to use random numbers to change the appearance
Generate Random Numbers
Generate Random Numbers  hi,,, Please give me answer with example How do you generate random numbers within a given limit with actionscript... This function generate random numbers with in given limit
random numbers - Java Beginners
random numbers  write a program to accept 50 numbers and display 5 numbers randomly  Hi Friend, Try the following code: import...); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.