Skip to content

Instantly share code, notes, and snippets.

@gdemir
Created May 3, 2010 15:24
Show Gist options
  • Save gdemir/388188 to your computer and use it in GitHub Desktop.
Save gdemir/388188 to your computer and use it in GitHub Desktop.
#include <stdio.h>
/* bu bir gist */
int main(int argc, char *argv[])
{
int toplam;
if (argc < 2) {
fprintf(stderr, "kullanım: %s [sayı]...\n", argv[0]);
return 1;
}
for (toplam = 0; argc > 0; argc--)
toplam += atoi(argv[argc-1]);
printf("toplam: %d\n", toplam);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment