This is a C++ program that prompts the user to input a limit, and then prints all the natural numbers from the limit down to 1, inclusive. Here is a brief explanation of the program:
#include<iostream> using namespace std; int main() { int n,i=1; cout<<"\nEnter the limit:"; cin>>n; for(n;n>=i;n--) { cout<<"\n"<<n; } return 0; }To download raw file Click Here
Enter the limit:10 10 9 8 7 6 5 4 3 2 1
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions