- jjot.com and jjots.com
- philippine.org and philippines.org
- damn.net and damns.net
- troubles.com and troubles.com
- and some variations of friendster like friendster,friedstar.
Sunday, May 18, 2008
wrong spelling wrong!
here are some site with domain names almost the same
Saturday, May 3, 2008
c code to reverse a string
/*
to reverse a string
*/
#include
#include
#include
void stringReverse(char string[],int length);
main()
{
int length;
char text[80];
printf("please enter the text:");
gets(text);
length=strlen(text);
return EXIT_SUCCESS;
}
void stringReverse(char string[], int length)
{
int ctr=length-1;
while(ctr>=0)
printf("%c", string[ctr]);
printf("\n");
return;
}
to reverse a string
*/
#include
#include
#include
void stringReverse(char string[],int length);
main()
{
int length;
char text[80];
printf("please enter the text:");
gets(text);
length=strlen(text);
return EXIT_SUCCESS;
}
void stringReverse(char string[], int length)
{
int ctr=length-1;
while(ctr>=0)
printf("%c", string[ctr]);
printf("\n");
return;
}
c code to determine if a string is a palindrome
its seems to be that most of my brain cells are unreachable at this moment so here are some stupid c code i have created. hehe.
1. to determine if a string is a palindrome:
/*
determines if a string is a palindrome
*/
#include
#include
#include
int isPalindrome(char string[],int length);
main()
{
int length;
char text[80];
printf("please enter the text:");
gets(text);
length=strlen(text);
if(isPalindrome(text, length))
printf("yes it is a palindrome.\n");
else
printf("sorry its not a palindrome.\n");
return EXIT_SUCCESS;
}
int isPalindrome(char string[], int length)
{
int ctr=length-1;
int i;
int value=0;
for(i=0;i<=ctr/2;i++)
{
if(string[i] != string[ctr])
break;
else value=1;
}
return value;
}
obviously the teacher will doubt if the code if its really yours when they saw the statement return EXIT_SUCCESS so if your a beginner just like me try something else so that your teacher wont bother you. :)
1. to determine if a string is a palindrome:
/*
determines if a string is a palindrome
*/
#include
int isPalindrome(char string[],int length);
main()
{
int length;
char text[80];
printf("please enter the text:");
gets(text);
length=strlen(text);
if(isPalindrome(text, length))
printf("yes it is a palindrome.\n");
else
printf("sorry its not a palindrome.\n");
return EXIT_SUCCESS;
}
int isPalindrome(char string[], int length)
{
int ctr=length-1;
int i;
int value=0;
for(i=0;i<=ctr/2;i++)
{
if(string[i] != string[ctr])
break;
else value=1;
}
return value;
}
obviously the teacher will doubt if the code if its really yours when they saw the statement return EXIT_SUCCESS so if your a beginner just like me try something else so that your teacher wont bother you. :)
Subscribe to:
Comments (Atom)
