write a program to print odd multiples of 3 from 3 to 50
Answers
Answered by
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
Business Studies,
6 months ago
Computer Science,
11 months ago
Science,
11 months ago
India Languages,
1 year ago