Search found 7 matches

by starrynight
Wed Aug 01, 2007 7:10 am
Forum: Volume 109 (10900-10999)
Topic: 10924 - Prime Words
Replies: 44
Views: 22483

10924 WA

excuse me ,can anyone tell me why I got a WA? because I can't find where I do wrong . thanks in advance :) and sorry for my poor English.. #include<stdio.h> #include<math.h> #include<string.h> int main() { char word[21]; double sum=0; int i,y,factor; while(gets(word) != NULL) { factor=0; for(i=0;i<2...
by starrynight
Mon Jul 30, 2007 11:29 am
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35767

272..WA

helloneo thank you very much. :D but this time I got WA ... can anyone tell me why? thanks! this is my code: #include <stdio.h> #include <string.h> int main() { int i; int k; int count; char sl[2000]; while( gets(sl) != NULL ) { k = strlen(sl); count = 0; for(i=0;i<k;i++) { if((sl[i] == '"') && (co...
by starrynight
Sun Jul 29, 2007 4:16 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35767

272 OLE

excuse me , can't anyone tell me,why i got an OLE ? and I don't know why I can't end this program when I enter"ctrl + z" ah .. sorry for my poor English this is my code: #include <stdio.h> #include <string.h> int main() { int i; int k; int count; char sl[2000]; while( gets(sl) != EOF ) { k = strlen(...
by starrynight
Sun Mar 11, 2007 8:48 am
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 15908

but...

this time I include math.h header file... but I got an WA? Can anyone tell me why? and..gcc &g++ is what? thx!! :D this is my code: #include <stdio.h> #include <math.h> #include <stdlib.h> int main() { double a ,b ,c ,r ,s ,s2 ,area; while (scanf("%lf %lf %lf",&a,&b,&c) != EOF) { s = ( a + b + c ) /...
by starrynight
Tue Mar 06, 2007 2:54 pm
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 15908

10195--CE

int main() { double a ,b ,c ,r ,s ,s2 ,area; while (scanf("%lf %lf %lf",&a,&b,&c) != EOF) { s = ( a + b + c ) / 2.0; area = sqrt(s * (s-a) * (s-b) * (s-c)); s2 = a + b + c; r = 2.0 * area * (1.0 / s2); printf("The radius of the round table is: %.3lf\n",r); } return 0; } i wrote this in C! who can te...
by starrynight
Mon Mar 05, 2007 5:09 pm
Forum: Volume 5 (500-599)
Topic: 568 - Just the Facts
Replies: 39
Views: 16597

how to improve it?

int main() { double a ,b; double factorial(double); double result; double n; while (scanf("%lf",&n) == 1) { if (n > 10000.) break; else { result = factorial(n); if( fmod(result,10.) != 0.) { a = fmod(result,10.); printf("%5lf -> %lf\n",n,a); } else { do { b = result / 10.; }while ( fmod(b ,10.) == 0...
by starrynight
Mon Mar 05, 2007 4:42 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 46473

HELP !I STILL GOT A WA!

int main() { long long int num1 ,num2,answer; while(scanf("%lld %lld",&num1,&num2) != EOF) { if(num1 > num2) { answer = num1 - num2; printf("%lld\n",answer); } else { answer = num2 - num1; printf("%lld\n",answer); } } return 0; } I wrote this in C! why I still got a WA~? thx! :o

Go to advanced search