Skip to content

Instantly share code, notes, and snippets.

@symtkn
Created October 1, 2011 13:36
Show Gist options
  • Save symtkn/1256058 to your computer and use it in GitHub Desktop.
Save symtkn/1256058 to your computer and use it in GitHub Desktop.
hesap makinesi hatası
#include <stdio.h>
int main()
{
int say1, say2, sonuc;
char tip;
printf("1. sayıyı giriniz: "); scanf("%d", &say1);
printf("2. sayıyı giriniz: "); scanf("%d", &say2);
printf("İşlem tipini giriniz (+,-,*,?): "); tip = getchar();
switch(tip){
case '+': printf("%d\n", say1 + say2); break;
case '-': printf("%d\n", say1 - say2); break;
case '*': printf("%d\n", say1 * say2); break;
case '/': printf("%d\n", say1 / say2); break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment