Search found 6 matches
- Fri Aug 17, 2012 2:29 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64813
Re: 488-Triangle Wave
Yes,But I had submitted once and got a wrong,but this time,the code hasn't been changed,this is very strange!!
- Thu Aug 16, 2012 12:45 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64813
Re: 488-Triangle Wave
I had submitted this for three times but it still wrong.I'm think there is an error where not discovered.
- Tue Aug 14, 2012 3:57 am
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64813
Re: 488-Triangle Wave
Really?I'm think so too.But I really got a WA? 

- Mon Aug 13, 2012 7:12 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64813
488-Triangle Wave
#include<stdio.h>
int Output(int Amplitude)
{
int index;
for(index=1;index<=Amplitude;++index)
{
for(int j=0;j!=index;++j)
printf("%d",index);
printf("\n");
}
for(index=index-2;index!=0;--index)
{
for(int j=0;j!=index;++j)
printf("%d",index);
printf("\n");
}
return 0;
}
int main(void ...
int Output(int Amplitude)
{
int index;
for(index=1;index<=Amplitude;++index)
{
for(int j=0;j!=index;++j)
printf("%d",index);
printf("\n");
}
for(index=index-2;index!=0;--index)
{
for(int j=0;j!=index;++j)
printf("%d",index);
printf("\n");
}
return 0;
}
int main(void ...
- Wed Aug 08, 2012 3:21 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58407
Re: 401-Palindromes
You're right,The program is AC,Thank you very much.brianfry713 wrote:after each output line, you must print an empty line.
- Tue Aug 07, 2012 7:08 pm
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58407
401-Palindromes
#include<stdio.h>
#include<string.h>
#define N 30
char reverse[]={"A000300HIL0JM0O0002TUVWXY51SE0Z0080"};
bool isRegular(char* str)
{
bool flag=true;
int beg=0,end=strlen(str)-1;
while(beg<=end)
{
if(str[beg]!=str[end])
{
flag=false;
break;
}
++beg;
--end;
}
return flag;
}
bool ...
#include<string.h>
#define N 30
char reverse[]={"A000300HIL0JM0O0002TUVWXY51SE0Z0080"};
bool isRegular(char* str)
{
bool flag=true;
int beg=0,end=strlen(str)-1;
while(beg<=end)
{
if(str[beg]!=str[end])
{
flag=false;
break;
}
++beg;
--end;
}
return flag;
}
bool ...