Category: Language

10
May
2017

Break From The Loops !

code: #include<stdio.h> int main() { int i,count; char ch; for(count=1; count<=100; count++) { printf(“count = %d\n”,count); printf(“Do…

10
May
2017

For Loop Tricks Difference

Code: #include<stdio.h> int main() { int n,sum,i; printf(“Enter here:”); scanf(“%d”,&n); sum=0; for(i=1; i<=n; sum=sum+i,i++) printf(“%d\n”,sum); return 0;…

10
May
2017

For Loop Tricks

For Loop Tricks: #include<stdio.h> int main() { int i; i=1; for(printf(“Hi\n”);i<=5;printf(“Dave\n”)){ printf(“Hello World\n”); i++; } return 0;…

10
May
2017

While Loop Tricks :D

code: #include<stdio.h> int main() { int i=1; while(i<=printf(“Hi\n”)){ printf(“Hello\n”); i++; } printf(“%d\n”,i); return 0; } output: Hi…

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…