Created
November 21, 2010 14:43
-
-
Save sayz/708784 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <stdlib.h> | |
#define N 7 | |
int main() | |
{ | |
int i, j; | |
char dizgem[N] = "123ab4"; | |
char tmp[1]; | |
char depo[N]= ""; | |
for(i = 0; i < strlen(dizgem); i++){ | |
if(isdigit(dizgem[i]) != 0){ | |
tmp[0] = dizgem[i]; | |
tmp[1] = '\0'; | |
strcat(depo, tmp); | |
} | |
} | |
j = atoi(depo); | |
printf("%d", j); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
düzeltilmiş kodu yazmak için ikinci bir gist açmana gerek yok (ekstra adres falan gerek yok yani). unutma her gist bir git deposu (klon adresi yukarıda). önceki gist'i doğrudan web'den düzenlemen veya klonlayıp lokalde düzenlemen ve push etmen yeterli.