Search found 2 matches

by bloodytears67
Thu Jan 26, 2012 3:51 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 22319

Re: 160 runtime error!

thanks brianfry713 :) it worked :)
by bloodytears67
Tue Jan 24, 2012 1:35 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 22319

160 runtime error!

It crashes after 96 :( #include <stdio.h> int primes[] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; int main() { int n,i; while ((scanf("%d",&n))==1) { if (n==0) break; else { printf("%3d! =",n); int count,temp; for (i=0; primes[i]<=n; i++) { count = 0; temp = n; while...

Go to advanced search