Category: Programming Problem Solving

07
Apr
2017

Prime or Not

Another easy understandable tut is in this link: http://zakilive.com/2017/05/12/check-the-number-is-prime-or-not-in-c-easy-and-details-explanation/ Code: #include<stdio.h> int main() { int i,flag,N; flag=0; printf(“eNter…

23
Jul
2016

Flags in C

Reference: https://www.daniweb.com/programming/software-development/threads/201233/use-of-flag-in-c

23
Jun
2016

Swap in C

Swap in C #include<stdio.h> int main() { int x,y,z; x=5; y=7; printf(“Before x=%d y=%d\n”,x,y); z=x; x=y; y=z;…

12
May
2016

Triangular Number Java Code True or False

Here yo can see what is triangular number: https://en.wikipedia.org/wiki/Triangular_number public class NumShape { public static void main(String[]…

11
May
2016

Problem 5 from 52 programming problems book

#include<iostream> #include<cstdio> using namespace std; int main() { int testcase,star,i,j,k; cin>>testcase; for(i=0; i<testcase; i++) { cin>>star; for(j=0;…

11
May
2016

Problem 4 from 52 programming problems book

Solution: #include<iostream> #include<cstdio> using namespace std; int main() { int testcase,i,num_range,j; cin>>testcase; for(i=1; i<=testcase; i++) { cin>>num_range;…