157k views
4 votes
Write a loop that reads positive integers from standard input

User BABU K
by
7.8k points

1 Answer

0 votes

Definitely the question is incomplete

Using for loop in java to print positive integers ,let say first 50 integers

So the loop is:

int i ;

for( i= 0; i<= 50; i++ ) {

print (i);

}

The looping will going to start from the 1 and stop to 50

User Zeetoobiker
by
7.5k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories