Computer Science, asked by shreyaamitmaurya, 3 months ago

write a loop to print natural number from 1 to20​

Answers

Answered by khanabdulrahman30651
2

Answer:

Step by step descriptive logic to print natural numbers from 1 to n .

  • Input upper limit to print natural number from user. Store it in some variable say N .
  • Run a for loop from 1 to N with 1 increment. The loop structure should be like for(i=1; i<=N; i++) . ...
  • Inside the loop body print the value of i .

Explanation:

don't forgot to mark as brainlist

Answered by 16233
3

Answer:

public class ABC{

public static void main() {

int I;

for(I=1;I<=20;I++) {

System.out.println(I) ;}}}

brainliest me this is in java only

Similar questions