Month: May 2017

10
May
2017

C Different Loop While

code: #include<stdio.h> int main() { int number,sum=0; printf(“Enter a positive number, negative to terminate:”); scanf(“%d”,&number); while(number>=0) {…

09
May
2017

C Conditional Logic

Conditional Question: source: http://101cproblems.com/problem-25/ Problem 25: Coordinate Take two integers indicating the x and y coordinate of…

09
May
2017

Learn Modulo in Easy Way

One thing was confusion for me but after watching this tut it is clear to me now….

09
May
2017

Leap Year Returned :P

code: #include<stdio.h> int main() { int year,x; printf(“Enter year:”); scanf(“%d”,&year); //((year%4==0&&year%100!=0)||(year%400==0))?:printf(“%d is not leap year.”,year); x=((year%4==0&&year%100!=0)||(year%400==0))?1:0; if(x==0)…

09
May
2017

Ternary in C

code: #include<stdio.h> int main() { int a=20,b=50,c=40,m; // if(a>b && a>c) // m=a; // else if(b>c) //…

09
May
2017

Design Pattern

https://www.google.com/search?q=design+patterns&rlz=1C1PRFC_enBD706BD706&oq=design+pattern&aqs=chrome.0.0j69i57j0j69i59j0l2.5254j0j4&sourceid=chrome&ie=UTF-8   https://sourcemaking.com/uml/basic-principles-and-background/models-views-and-diagrams http://www.oodesign.com/