write a java class program to input a number and print its odd factors
Answers
Answered by
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