Created
October 2, 2011 13:01
-
-
Save symtkn/1257433 to your computer and use it in GitHub Desktop.
basit_hesap_makinesi
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> | |
int main() | |
{ | |
int say1, say2, sonuc; | |
char tip; | |
printf("İşlem tipini giriniz (+,-*,/): "); tip = getchar(); | |
printf("1. sayıyı giriniz: "); scanf("%d", &say1); | |
printf("2. sayıyı giriniz: "); scanf("%d", &say2); | |
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