#include <stdio.h>intMain () {intM,n,i=2, tlm=0, tln=0, x=2, count=0, tl=0, q=0, ii=0; scanf ("%d%d",&m,&N); Q=m-1; for(i=2; count<n;i++) { while(i%x!=0) {x+=1;} if(x==i) {TLN+=i; Count+=1; } x=2; } II=i-1; X=2, count=0; for(i=2; count<m-1; i++) { while(i%x!=0) {x+=1;} if(x==i) {TLM+=i; Count+=1; } x=2; } //printf ("%d%d%d\n", II,TLN,TLM);tl=tln-TLM; printf ("%d", TL); System ("Pause");}
Prime and
#include <stdio.h>intMain () {intA=0, t=0, count=0, sj=1, type=0, m=0, ct=0, tt=0; scanf ("%d",&a); if(a<0) {printf ("Fu"); A=-A; } if(a==0) {printf ("Ling"); } t=A; for(count=1;t>0; count++) {T/=Ten; }//printf ("c=%d", count);ct=count; for(sj=1;count>2; count--) {SJ*=Ten; }//printf ("sj=%d", SJ);t=A; TT=t;//printf ("%d", t); for(type=0;t>0; sj/=Ten, count--) {type=t/SJ; Switch(type) { Case 1:p rintf ("Yi"); Break; Case 2:p rintf ("er"); Break; Case 3:p rintf ("San"); Break; Case 4:p rintf ("si"); Break; Case 5:p rintf ("Wu"); Break; Case 6:p rintf ("Liu"); Break; Case 7:p rintf ("Qi"); Break; Case 8:p rintf ("BA"); Break; Case 9:p rintf ("JIU"); Break; }//printf ("%d%d%d", t,sj,t%sj,ct); if(tt>9&&tt==type*SJ) {printf (" "); for(;ct>2; ct--) {printf ("Ling");if(ct-3>0) {printf (" ");} } } T=t-type*SJ; if(t>0) {printf (" "); }} system ("Pause");}
Read integers
Introduction to "NetEase" "homework" programming-C language Onge fourth week