The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled C Code
Posted by: MrCoffee | July 11, 2010 @ 11:04pm
C Code
[
Download
]
#include <stdlib.h> #include <stdio.h> #include <string.h> int main() { char string[10],string2[10],track[10]; printf("Enter a string\n"); scanf("%s",&string); printf("Enter another string \n"); scanf("%s",&string2); strcpy(track,string); int i,j,a; do{ a=string[strlen(string)-1]; for (j=(strlen(string)-1);j>=1;j--){ string[j]=string[j-1]; } string[0]=a; for (i=0;i<strlen(string);i++){ printf("%c",string[i]);} printf("\n"); if (strcmp(string,string2)==0){ printf("We have a match \n");} }while((strcmp(string,track)!=0)); return 0; }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.67 / 8
36 Votes
http://codebin.yi.org/736
page generated in 0.01 seconds