Computer Science, asked by arkamanna00026, 11 months ago

write a java class program to input a number and print its odd factors

Answers

Answered by venkataniveditha1997
8

Answer:

Class A

{

Public static void main (String [] args)

{

int n;

Scanner sc=new Scanner() ;

n=sc. nextInt() ;

for(int i=1;i<=n;i++)

{

if(n%i==1)

System.out.println (n) ;

}

}

Similar questions