Computer Science, asked by DrStudy, 1 year ago

write a program in Java to print first 10 odd numbers with their sum using 'for' loop with correct syntax.​

Answers

Answered by LalitmGoyal
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 ayanaslam2005
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