Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- public class Number {
- private static int[] num = new int [100];
- private static int i = 0;
- public Number(int a){
- while (a != 0){
- num[i] = a % 10;
- i++;
- a = a/10;
- }
- }
- public static void mul (num, int d){
- int c = 0;
- while (c <= i){
- int res = num[c] * d;
- if(res > 9)
- {
- num[c] = res % 10;
- num[c + 1] = res / 10;
- }
- else num[c] = res;
- }
- }
- public String toString(){
- Arrays.toString(num);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement