Skip to content

Instantly share code, notes, and snippets.

@LRTlabs
Last active December 27, 2018 17:30
Show Gist options
  • Save LRTlabs/2c023ede43011cd26726e69b65dc8315 to your computer and use it in GitHub Desktop.
Save LRTlabs/2c023ede43011cd26726e69b65dc8315 to your computer and use it in GitHub Desktop.
Arduino Tarifleri #21 - Fonksiyonlar -3 kod2
/*
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