decimal=int/int

  • Thread starter Thread starter orioth
  • Start date Start date
O

orioth

merhaba ben,int olan iki sayýnýn bölümünü decimal bi deðiþkene
atamak istiyorum.sonuç decimal mi yoksa int mi çýkar?
 
decimal sonuc = (decimal)i / j;

normalde iki interger'ýn bölümü integer'dýr. küsürat varsa atýlýr. decimal
sonuç almak istiyosan yukardaki gibi, ya pay ya paydayý decimal'e çevirmen
lazým.
 
Orioth,

Is this a special message to Miha.

All people use English in these dotnet newsgroups.

I am curious what language that is

:-)

Cor

"orioth" <[email protected]> schreef in bericht
merhaba ben,int olan iki sayýnýn bölümünü decimal bi deðiþkene
atamak istiyorum.sonuç decimal mi yoksa int mi çýkar?
 
Back
Top