Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/ #include <stdio.h> int main() { char name[600]; gets(name); printf((strlen(name)>80)?"NO\n":"YES\n"); return 0; }
Hi i would like to know why am i getting WA(30%) on my solution can't find the mistake
ReplyDelete#include
#include
int main(){
char L[500];
int i;
gets(L);
i = strlen(L);
if(i < 80){
printf("YES\n");
}
else{
printf("NO\n");
}
return 0;
}
i<= 80
ReplyDeleteprintf("YES")
why we used 600 range in character?
ReplyDelete#include
ReplyDelete#define MAX 500
int main()
{
char ch[500];
int n;
gets(ch);
n = strlen(ch);
if(n>80) printf("NO\n");
else printf("YES\n");
return 0;
}
//how it is runtime error?
why it is not working with scanf function
ReplyDelete