1 4 1 27 8 1 256 81 16 1 3125 1024 143 32 1
#include<stdio.h> main() { int i,j,k,res=1; for(i=1;i<=5;i++) { for(j=i;j>=1;j--) { for(k=1;k<=j;k++) { res = res*j; } printf("%d ",res); res=1; } printf("\n"); } }
Given an ODD number, print diamond pattern of stars recursively.
Example Input: n = 5,
Output:
* *** ***** *** *
How will we print numbers from 1 to N without using loop or recursion?
What is the Best Pattern or Topology for avoid Memory Leaks in Projects