there is some question I want to ask
1. if the linput like this:
<blank line><blank line>122333
what should the output like?
49 1
50 2
51 3
or
51 3
50 2
49 1
2. do the ascii value for all character has to be printed even 'blank line' and 'enter' char??
thank you very much..
Search found 10 matches
- Mon Dec 23, 2002 6:50 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10062 - Tell me the frequencies!
- Replies: 235
- Views: 69473
- Sun Dec 22, 2002 7:21 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10062 - Tell me the frequencies!
- Replies: 235
- Views: 69473
- Sun Dec 22, 2002 5:40 am
- Forum: Volume 100 (10000-10099)
- Topic: 10062 - Tell me the frequencies!
- Replies: 235
- Views: 69473
- Sun Dec 22, 2002 5:38 am
- Forum: Volume 5 (500-599)
- Topic: 568 - Just the Facts
- Replies: 39
- Views: 21268
- Sat Dec 21, 2002 11:47 am
- Forum: Volume 100 (10000-10099)
- Topic: 10062 - Tell me the frequencies!
- Replies: 235
- Views: 69473
- Sat Dec 21, 2002 11:41 am
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30241
412 WA
i don't know why my code get WA
can anybody tell me why?
[c]
#include <stdio.h>
#include <math.h>
int test ( int a, int b ) {
for( ; ; ) {
if ( a < b )
a^=b^=a^=b;
if ( a % b == 0 )
return b;
a %= b;
}
}
int main()
{
int input, a[100], i, j, counter = 0, total;
double temp, temp2;
for ...
can anybody tell me why?
[c]
#include <stdio.h>
#include <math.h>
int test ( int a, int b ) {
for( ; ; ) {
if ( a < b )
a^=b^=a^=b;
if ( a % b == 0 )
return b;
a %= b;
}
}
int main()
{
int input, a[100], i, j, counter = 0, total;
double temp, temp2;
for ...
- Sat Dec 21, 2002 7:36 am
- Forum: Volume 5 (500-599)
- Topic: 568 - Just the Facts
- Replies: 39
- Views: 21268
- Sat Dec 21, 2002 7:29 am
- Forum: Volume 100 (10000-10099)
- Topic: 10062 - Tell me the frequencies!
- Replies: 235
- Views: 69473
10062 WA why??
why do my code get a WA i think nothing goes wrong with it???
can any body help me with this.
thanks...
#include <stdio.h>
int main()
{
char input[1001];
int i, temp, ascii[256];
for ( i = 0; i < 1001; i++ ) {
input = 0;
}
for ( i= 0; i < 256; i++ ) {
ascii = 0;
}
while ( gets(input ...
can any body help me with this.
thanks...
#include <stdio.h>
int main()
{
char input[1001];
int i, temp, ascii[256];
for ( i = 0; i < 1001; i++ ) {
input = 0;
}
for ( i= 0; i < 256; i++ ) {
ascii = 0;
}
while ( gets(input ...
- Fri Dec 13, 2002 8:26 pm
- Forum: Volume 5 (500-599)
- Topic: 568 - Just the Facts
- Replies: 39
- Views: 21268
- Tue Dec 10, 2002 6:20 pm
- Forum: Volume 5 (500-599)
- Topic: 568 - Just the Facts
- Replies: 39
- Views: 21268
568 time limit helllp
#include <stdio.h>
int main()
{
int num, num2, i, temp = 1, j;
for (;;) {
scanf("%d", &num);
num2 = num;
temp = 1;
for ( i = 2; i <= num; i++ ) {
temp = temp * i;
while ( temp % 10 == 0 ) {
temp /= 10;
}
temp %= 100000;
}
temp %= 10;
printf("%5d -> %d\n", num2, temp);
}
return 0 ...
int main()
{
int num, num2, i, temp = 1, j;
for (;;) {
scanf("%d", &num);
num2 = num;
temp = 1;
for ( i = 2; i <= num; i++ ) {
temp = temp * i;
while ( temp % 10 == 0 ) {
temp /= 10;
}
temp %= 100000;
}
temp %= 10;
printf("%5d -> %d\n", num2, temp);
}
return 0 ...