Skip to content

Instantly share code, notes, and snippets.

@sayz
Created November 21, 2010 14:43
Show Gist options
  • Save sayz/708784 to your computer and use it in GitHub Desktop.
Save sayz/708784 to your computer and use it in GitHub Desktop.
#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;
}
@roktas
Copy link

roktas commented Dec 2, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment