Search found 1 match

by arefinnomi
Mon Jul 07, 2014 10:59 pm
Forum: Volume 109 (10900-10999)
Topic: 10924 - Prime Words
Replies: 44
Views: 29708

10924 - Prime Words

i have tested many case.
this code have passed successfully.
but got WA.


#include <stdio.h>
char prime(int n)
{
int a;
char re;
double remainder;
for(a=2; a<n; a++)
{
remainder=n%a;
if(remainder==0)
{
break;
}
}
if(remainder==0)
{
re = 'n';
}
else
{
re='p';
}

return re ...

Go to advanced search