Computer Science, asked by mrdonnn4, 10 months ago

write a program to print odd multiples of 3 from 3 to 50​

Answers

Answered by VenomParasite
2

class Problem

{

public static void main(String[] args)

{

int num=3;

while(num<=50)

{

if(num%2!=0)

{

System.out.print(" "+num);

}

num=num+3;

}

}

}

Output : 3 9 15 21 27 33 39 45

If you find my answer helpful then mark me as brainliest! Thank you.

Similar questions