Tech Study

C Program To Print All Natural Numbers In Reverse Order

Introduction

Write a C program to print all natural numbers in reverse order

#include <stdio.h>

int main()
{
    int i, num;

    //Read a number from user
    printf("Enter any number: ");
    scanf("%d", &num);

    /*Running loop from the number entered by user,
      and Decrementing by 1*/
    for(i=num; i>=1; i--)
    {
        printf("%d\n", i);
    }
    return 0;
}

Result

Write a C program to print all natural numbers in reverse order
Write a C program to print all natural numbers in reverse order

Write C program to print multiplication table of a given number

write a c program to print sum of digits

TaggedWrite a C program to print all natural numbers in reverse order

Python Examples

Introduction: Python Examples are the basic programming concepts of python like python syntax,python data types,,python operators,python if else,python comments etc.. …

Read more

C String Functions

C String Functions perform certain operations, It provides many useful string functions which can come into action. The <string.h> header …

Read more