Last active
December 27, 2018 17:30
-
-
Save LRTlabs/2c023ede43011cd26726e69b65dc8315 to your computer and use it in GitHub Desktop.
Arduino Tarifleri #21 - Fonksiyonlar -3 kod2
This file contains hidden or 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
/* | |
Lezzetli Robot Tarifleri | |
Arduino Tarifleri -21- | |
Fonksiyonlar -3 / Kod 2 | |
VİDEO >>> https://lezzetlirobottarifleri.com/arduino-tarifleri-21-fonksiyonlar-3 | |
*/ | |
int a ; // kullanılan değişkenler tanımladı | |
int b ; | |
int toplam; | |
int cikartma; | |
void topla (int h , int g) // toplama isimli fonksiyon | |
{ | |
toplam = h + g ; | |
} | |
void cikart (int z , int y) // cikart isimli fonksiyon | |
{ | |
cikartma = b - a; | |
} | |
void setup() | |
{ | |
Serial.begin(9600); // ser haberleşme başladı | |
} | |
void loop() | |
{ | |
a = 5; | |
b = 6; | |
topla(a, b); // topla fonksiyonu parametre ile çağırıldı | |
Serial.print("toplam = "); | |
Serial.println(toplam); | |
cikart(b, a); // cikart fonksiyonu parametre ile cağırıldı | |
Serial.print("sonuc = "); | |
Serial.println(cikartma); | |
while (1);// sonsuz döngü ile programı kitledik | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment