Skip to content

Instantly share code, notes, and snippets.

@ecmelkytz
Created November 19, 2011 20:54
Show Gist options
  • Save ecmelkytz/1379347 to your computer and use it in GitHub Desktop.
Save ecmelkytz/1379347 to your computer and use it in GitHub Desktop.
/* "a-b-c" olarak alınan girdiyi "abc" şeklinde döndüren program*/
#include<stdio.h>
int main(void)
{
char yazi[10],son[10],karakter;
int i,a;
printf("birseyler yaz:");
scanf("%s",yazi);
for(i=0,a=0;yazi[i]!='\0';i++,a++){
if(yazi[i]!='-')
son[a]=yazi[i];
else a-=1;
}
printf("%s\n",son);
return (0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment