wap in java to print the factors of the number I want the whole program as fast as possible
Answers
Answered by
1
Answer:
import java.util.*;
class factors
{
public static void main(String args[ ])
{
Scannee sc=new Scanner(System.in);
SOPln("enter a number");
int N=sc.nextInt( );
for(int i=0;i<=N;i++)
{
if(N%i==0)
SOPln(i);
}
}
}
Explanation:
HOPE IT HELPS U MATE✌✌✌
Similar questions