multiply of 100 digits numbers

multiply of 100 digits numbers

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 Tutorials/Questions & Answers:
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...;=100;i++){ System.out.println(i); } } } Thanks  ...{ public static void main(String[] args){ for(int i=1;i<=100;i
Advertisements
Generate random numbers from 1 to 100
Generate random numbers from 1 to 100  1)A class Called: RandomNumberGenerator that generate random numbers from 1 to 100 2)A class Test that tests the hierarchy in A) especially the getArea() and getVolume() methods. Use
Prime numbers in Java between 1 and 100
Prime numbers in Java between 1 and 100  Hi, How to display prime numbers in java between 1 and 100? Thanks   Hi, Prime numbers... which prints prime numbers between 1 and 100. Here is complete for printing prime
How to list even numbers between 1 and 100?
How to list even numbers between 1 and 100?  Hi, I Java to check if a number is even? How to list even numbers between 1 and 100? Thanks  ... the numbers between 1 and 100 for (int i=1;i <=num ; i++){ if(i%2==0
Mysql Multiply
Mysql Multiply       Mysql Multiply is used to define the product of any two or more numbers... from 'Mysql Multiply'. The example elaborate a query that help you to return
Mysql Multiply
Mysql Multiply       Mysql Multiply is used to define the product of any two or more numbers in a table. Understand with ExampleADS_TO_REPLACE_1 The Tutorial
ModuleNotFoundError: No module named 'digits'
ModuleNotFoundError: No module named 'digits'  Hi, My Python... 'digits' How to remove the ModuleNotFoundError: No module named 'digits'... to install padas library. You can install digits python with following command
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
ModuleNotFoundError: No module named 'python-digits'
ModuleNotFoundError: No module named 'python-digits'  Hi, My... 'python-digits' How to remove the ModuleNotFoundError: No module named 'python-digits' error? Thanks   Hi, In your python
java program_big digits multiplication..
java program_big digits multiplication..  i want program about big digits multiplication program using java..plz tel me answer
ModuleNotFoundError: No module named 'etl-multiply'
ModuleNotFoundError: No module named 'etl-multiply'  Hi, My Python... 'etl-multiply' How to remove the ModuleNotFoundError: No module named 'etl-multiply' error? Thanks   Hi, In your python
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
ModuleNotFoundError: No module named 'digits-py-lib'
ModuleNotFoundError: No module named 'digits-py-lib'  Hi, My... 'digits-py-lib' How to remove the ModuleNotFoundError: No module named 'digits-py-lib' error? Thanks   Hi, In your python
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
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...;Ajax Multiply Example</title>   <script language="Javascript
automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link:ADS_TO_REPLACE_1 Automorphic numbers Thanks
java string replace all non digits
java string replace all non digits  Hi, I am doing some processing on the text data. I have requirement to remove all the charaters from the data except the digits. How to replace all non digits in a string with some character
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
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
Java bigdecimal multiply example
Java bigdecimal multiply example       Example below demonstrates bigdecimal class multiply... BigDecimal multiply(BigDecimal multiplicand) BigDecimal objects with names x ,y
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
Listing all even numbers between two numbers
Listing all even numbers between two numbers  Hi, How to write code to list all the even numbers between two given numbers? Thanks   Hi, You function will take 2 numbers and the find the even numbers between
data science 100
data science 100  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science 100 Try... "data science 100". Also tell me which is the good training courses
data science 100 berkeley
data science 100 berkeley  Hi, I am beginner in Data Science... 100 berkeley Try to provide me good examples or tutorials links so that I can learn the topic "data science 100 berkeley". Also tell me which
how to add to numbers in java
how to add to numbers in java  how to add to numbers in java
Formatting numbers in Velocity Templates?
Formatting numbers in Velocity Templates?  I need to display amount in following formats: 1099 -> 1,099.00 100 -> 100.00 100.251 -> 100.25 10999 -> 10,999.00 1110999 -> 11,10,999.00 Right now I am using
Formatting numbers in Velocity Templates?
Formatting numbers in Velocity Templates?  I need to display amount in following formats: 1099 -> 1,099.00 100 -> 100.00 100.251 -> 100.25 10999 -> 10,999.00 1110999 -> 11,10,999.00 Right now I am using
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
Addition of two numbers
Addition of two numbers  addition of two numbers
print the even numbers between the range 100-200
print the even numbers between the range 100-200  Q ?write... 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
defining numbers in Java Script
defining numbers in Java Script  Explain about defining numbers in Java Script
ModuleNotFoundError: No module named 'numbers'
ModuleNotFoundError: No module named 'numbers'  Hi, My Python... 'numbers' How to remove the ModuleNotFoundError: No module named 'numbers... to install padas library. You can install numbers python with following command
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
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
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
Write a C language program to read two matrices and multiply them?
++ ) { for ( d = 0 ; d < q ; d++ ) printf("%d\t", multiply[c][d...Write a C language program to read two matrices and multiply them?  Write a C language program to read two matrices and multiply them?   
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
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
recursion numbers - Java Beginners
recursion numbers  I need to use recursion to test all values from 0 to 20 and see if they are contain in a 1-D array with values: 2,4,6,8,10,12,14,16,18,20. The results of all numbers from 0-20 will be printed
Sum of positive and negative numbers
; import java.util.*; class Numbers { public static void main(String...=0,sum2=0; int num[]=new int[10]; System.out.println("Enter 10 numbers...]; } } System.out.println("Sum of positive numbers: "+sum2); System.out.println
Application for print pyramid of numbers
Application for print pyramid of numbers  What is the code for printing the numbers like 1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
Sum of first n numbers
Sum of first n numbers  i want a simple java program which will show the sum of first n numbers....   import java.util.*; public class...; } System.out.println("Sum of Numbers from 1 to "+n+" : "+sum
random numbers - Java Beginners
to display the random numbers, but not twice or more. I mean i need a number to be display once. This code allows some numbers to be displayed more than once. Hi... Scanner(System.in); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i
Prime Numbers - IDE Questions
Prime Numbers  Create a program that calculates the prime numbers... numbers in rows of 10. Hint: Use a counter to count how many values are printed... = 0; System.out.println("Prime Numbers are:" ); for (int i = 1; i <

Ads