Created
October 1, 2011 13:36
-
-
Save symtkn/1256058 to your computer and use it in GitHub Desktop.
hesap makinesi hatası
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("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