C programming language.
Write a program to print reverse of all the numbers from m to n using functions with arguments and no return type. The inputs in the program will be m and n variables and need to take these variables as arguments.
#include <stdio.h> void printReverse(int m, int n){ for(int i = n;i>=m;i--){ printf("%d ",i); } } int main() { int m,n; printf("Enter value for m: "); scanf("%d",&m); printf("Enter value for n: "); scanf("%d",&n); printReverse(m,n); return 0; }
Get Answers For Free
Most questions answered within 1 hours.