Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Header file



Working with switch case



" ; " after loop



Specifer



Test expression




Print natural number in a given range ( decending way )



// AHF C PROGRAM SOLVING

//solving here ITERATIVES STATEMENTS type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int n,m,j; //taking the number to continue loop as start point pf("Enter the first number: "); scanf("%d",&n); //taking the number to stop loop pf("\nEnter the second number: "); scanf("%d",&m); //printing from second to first number by decrement one for(j=m;j>=n;j--) pf("%d ",j); return 0; }
OUTPUT:


© 2018 - All rights reserved