Run this program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Run this program

public class Program { public static void main(String[] args) { int i; for(i=1;i<=10;i++) System.out.println("Hello Guys"); System.out.println("How are you"); } }

12th Jan 2021, 4:18 AM
Prakhar Rai
Prakhar Rai - avatar
1 Answer
+ 2
It's working fine. Or if you want those both statements print every loop then add curly brackets { } around your "for loop" statements. Here's your code with { } https://code.sololearn.com/cZgvJy60Zuwj/?ref=app
12th Jan 2021, 4:22 AM
noteve
noteve - avatar