Bai21

Bai21
 avatar
unknown
java
a year ago
554 B
6
Indexable
import java.util.Scanner;
import java.lang.Math;

public class main{
    static float deQuy(int i, float total){
        if(i == 0){
            return 1;
        }
        return total*i;
    }
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        
        System.out.print("Nhap n");
        int  n= input.nextInt();
        int sum = 0;
        for(int i =1; i<=n; i++){
            if (n%i==0){
                sum*=i;
            }
        }
        System.out.print(sum);
    }
}
Editor is loading...
Leave a Comment