Computer Science, asked by rumya0108, 11 months ago

write a program to print all odd numbers from 10 to 50​


Reeyansh: in java ??
rumya0108: yes

Answers

Answered by Reeyansh
3

class even_odd

{

public static void main (String args[])

{

int c = 10 ;

while(c<=50)

{

if( c/2 !=0)

System.out.println( c );

}

}

}

Although I'm sure it's correct , you must do the dryrun yourself to get confirmed ...ya know in case if there's some error .

Similar questions