Category: ACM

16
May
2017

Tower of Hanoi Recursion

code: #include<stdio.h> void toh(int n,int source,int aux,int dest) { if(n==1){ //just pick and place printf(“move the disk…

14
May
2017

Recursion in C

code: #include<stdio.h> void printNo(unsigned int n) { if(n==0) return; //it is outing from this function and going…

14
May
2017

DCP-4: Great!!! The Work Is Done Solution

code i tried  around 5 of hours but didn’t succeded: #include<stdio.h> #include<math.h> int main() { int t,n,i,result,p,sum=0;…

13
May
2017

Recursion Example

code: #include<stdio.h> void printMsg(unsigned int n) { if(n==0) return; //when we are using return in void function…

13
May
2017

Void clear in C

We  see lots of void in C. Lets clear why we all use  this. int myFunc(void){ }…

13
May
2017

Extract Digits From a Number and Make a Sum of all the digits and show this in C

Code is here: #include<stdio.h> int main() { int number; scanf(“%d”,&number); char digits[2000000]; int i=0,d; while(number>0) { d=number%10;…