(adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-2960223314593660", enable_page_level_ads: true }); Python program to print natural numbers from 1 to n. - TecGlance

Header Ads

Python program to print natural numbers from 1 to n.

Algorithm::



Step 1: Start
Step 2: Assign i=1
Step 3: Read a number, num
Step 4: Repeat step 5&6 until i=num reach
Step 5: Print i
Step 6: Compute i=i+1
Step 7: Stop

Flowchart::

No comments

Powered by Blogger.