write a program in Java to print first 10 odd numbers with their sum using 'for' loop with correct syntax.
Answers
Answered by
15
Answer:
class num
{
public static void main(String args[])
{
int n ;
for(n=1;n<=20;n+=2)
{
System.out.println(n);
}
}
}
If the answer is helpful please mark it as the brainliest
Answered by
4
Answer:
class num
{
public static void main(String args[])
{
int n ;
for(n=1;n<=20;n+=2)
{
System.out.println(n);
}
}
}
Hope this helps you.....
Pls mark me brainliest....
Similar questions