info@sislbd.com +8801615 900004

Blog

November 25, 2017

#include <stdio.h> int prime(int x); long sum=1,store; int main() { long Number,N,N1,prime1,prime2,a,save; scanf(“%ld”,&Number); for(long i3=1;i3<=Number;i3++) { scanf(“%ld”,&N); if(N%2==0) N1=N/2; else { int N2=N+1; N1=N2/2; } for(long i=N1;i<=N;i++) prime(i); for(int i=1;i<sum;i++) a=store; int r=1; for(int i=1;i<sum;i++) { for(int p=1;p<=5;p++) { if((a*p <= N) && (N < a*(p+1))) { save= N-p*a; prime2= a; r=r+1; } } }

November 25, 2017

#include <stdio.h> int main() { long L,H,sum,max,track,V,c,temp; while(scanf(“%ld %ld”, &L, &H) && L && H) { max=-99999999; sum=0; if(L > H) { temp=L; L=H; H=temp; } // End of if for(long i=L;i<=H;i++) { track=i; c=i; while(1) { if(c%2==0) { c=c/2; sum +=1; } // End of if else { c = c*3+1; sum +=1; }

November 25, 2017

#include <stdio.h> int main() { long ugly; long Max=1000000000; ugly=1; for(int i=1;i<1500;i++) { ugly=Max; for(int j=0; j < i;j++) { if(ugly*2 > ugly) { if(ugly*2 < ugly) ugly=ugly*2; } // End of else if else if(ugly*3 > ugly) { if(ugly*3 < ugly) ugly=ugly*3; } // End of else if else if(ugly*5 > ugly) { if(ugly*5

November 25, 2017

#include <stdio.h> #include <stdlib.h> int main() { long input,a,p,sum,k,get; while(scanf(“%ld”, &input)== 1) { sum = 0; get = 0; p=input*(input-1)/2; scanf(“%ld”,&a); for(long i=1;i<input;i++) { scanf(“%ld”,&a); k=abs(a-a); sum += k; } for(long j=1;j<input;j++) { for (long p=j+1;p<input;p++) { if((k==k) || k > input) get=1; } } if(p == sum && get==0) printf(“Jolly”); else printf(“Not jolly”); printf(“\n”);

November 25, 2017

#include <stdio.h> #include <ctype.h> int main() { char line,character; long c,n,p; while(scanf(“%c”,&character)!=EOF) { c=0; n=0; p=0; line=character; do { if(isalpha(line) > 0) { if(p==1) { n=n+1; p=0; } } else { if(line == 34 || line == 39) p=0; else p=1; } c++; character = getchar(); line=character; }while(character != ‘\n’); c = c-1; line=’\0′; if(c