Answer to Question #285544 in Java | JSP | JSF for kkkkkk

Question #285544

for loop



sample output



b. 1 5 2 10 3 15 4 20 5 25

1
Expert's answer
2022-01-07T09:00:48-0500
public class App{


     public static void main(String []args){
        
        
        int k=5;
        for(int i=1;i<=5;i++){
            System.out.print(i+" "+k+" ");
            k+=5;
        }
     }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog