CodeForces Round #378 (Div. 2), problem: (B) Parade Solution In C

By | 2017-04-07T22:11:50+00:00 November 1st, 2016|Categories: C/C++, Programming|Tags: , , , , , , , , |

Hey Guys I just tried the Parade solution , hope you like it , comment if you have any better code . #include int main(){ int n,i,a[100000][2],k=0;long int s=0,x,l=0,r=0; scanf("%d",&n); for(i=0;i

Swapping Values of variables in C Programming

By | 2017-04-07T22:11:51+00:00 October 17th, 2016|Categories: C/C++, Programming, Uncategorized|Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , |

This is really a easy code for swapping values of variables.Try to understand the logic. We have to take another extra integer (temp). Logic : Stored the value of "b" in "temp". Then stored the value of "a" in "b".Then "c" in "a". Finally [...]

Prime Number Program in C Language

By | 2017-04-07T22:11:51+00:00 October 15th, 2016|Categories: C/C++, Programming|Tags: , , , , , , , , , , , , , , , , , , , , , |

This is just a simple program for Prime Number.  Logic is simple. Checking the inputed number if it is divided by 2 or not. We just need to use a for loop. If you any other efficient  code feel free to share with us. [...]