Bai24
Bai24unknown
java
a year ago
547 B
5
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 && i%2==1){ System.out.println(i); } } } }
Editor is loading...
Leave a Comment