Category: ACM Technique

11
Apr
2017

Find maximum and minimum value in an array

for maximum: #include<stdio.h> int main() { int ary[7]={-99,45,100,37,89,-327,245}; int i,max=0; for(i=0;i<7;i++) { if(ary[i]>max) { max=ary[i]; } }…

08
Apr
2017

Continue and Break

code 1: #include<stdio.h> int main(){ int i; for(i=10;i<20;i++) { if(i%2==0) continue; if(i>16) break; printf(“%d\n”,i); } return 0;…

07
Apr
2017

Pattern Printing

Problem: **** *** ** * code: #include<stdio.h> int main() { int i,j; for(i=1; i<=4; i++) { for(j=i;…

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…

05
Apr
2017

Sum of series

code: series: 1/1+1/2+1/3+….+1/N #include<stdio.h> int main() { int N,i; float sum; printf(“Enter N:”); scanf(“%d”,&N); sum=0; i=1; do{…

17
Feb
2015

Some ICPC related programming techniques in c

Sometimes i feel i have to write those in somewhere so i am writing those techniques here…