Wednesday, December 12, 2012

porgram c# polindrome 2


//Program for palindrome
#include<stdio.h>
#include<conio.h>
#include<string.h>

int main()
{
char s[100];
int i,j,l;

printf("masukkan bilangan\n\n");
gets(s);
l=strlen(s);


for (i=0,j=l-1;i<j;i++,j--)
{
if (s[i]!=s[j])
{
printf("\nbukan Palindrome");
break;
}
else
printf("\nPalindrome");
}

return 0;
}


0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More