Computer Science, asked by shreshtha3195, 1 year ago

wap in java to print the factors of the number I want the whole program as fast as possible​

Answers

Answered by Anonymous
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