gtag('config', 'UA-180278623-1'); UNITY 3D C# Temelleri Operatörler (RELATIONAL OPERATORS) - Bilginiz Dahilinde

Ads Top

UNITY 3D C# Temelleri Operatörler (RELATIONAL OPERATORS)

 RELATIONAL OPERATORS:

RELATIONAL OPERATORS:


public class HelloWorld : MonoBehaviour

{

    public int sayi1 = 18;

    public int sayi2 = 20;

    private float sonuc;

    public bool goster;

    public bool goster2;

   //  <, >, == ,<= ,>= ,!=

    void Start()

    {

        if (sayi1 != sayi2)

        {

            print("no");

        }

      }

Eğer Sayi1 sayi2’ye eşit değilse no yazdır

<  küçüktür

>  büyüktür

==  Eşittir

<=  Küçük Eşittir

>=  Büyük Eşittir

!=  Eşit Değildir

 // Update is called once per frame

    void Update()

    {     

    }

}

public class HelloWorld : MonoBehaviour

{

    public int sayi1 = 18;

    public int sayi2 = 20;

    private float sonuc;

    public bool goster;

    public bool goster2;

   //  <, >, == ,<= ,>= ,!=

    void Start()

   {

        if (sayi1 >= 12)

        {

            print("no");

        }

      }

   // Update is called once per frame

    void Update()

    {    

    }

}

 

 

 

Hiç yorum yok:

Blogger tarafından desteklenmektedir.