Computer Science, asked by humanbeing25, 11 months ago

write a programme to print 20 natural numbers
using 'for loop'​

Answers

Answered by avpurohit
0

Answer:

I assume you are a beginner so I am writing answer in two programming languages C++ and python(As you haven't mentioned which language )

Explanation:

C++:

#include<iostream.h>

int main()

{

for(int i=1;i<=20;i++)

{

cout<<i;

}

return 0;

}

Python

for i in range(20):

print(i+1)

Similar questions