Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Dart Programming - Remainder Method

void main() { 
   var a = 10; 
   var b = 17; 
   print(a.remainder(2)); 
   print(b.remainder(2)); 
}

Dart Programming - Floor Method

void main() { 
   var a = 2.9; 
   print("The floor value of 2.9 = ${a.floor()}"); 
} 

Dart Programming - CompareTo Method

void main() { 
   var a = 2.4; 
   print(a.compareTo(12)); 
   print(a.compareTo(2.4)); 
   print(a.compareTo(0)); 
} 

Dart Programming - Ceil Method

void main() { 
   var a = 2.4; 
   print("The ceiling value of 2.4 = ${a.ceil()}"); 
}  

Dart Programming - Abs Method

void main() {  
   var a = -2; 
   print(a.abs()); 
}

Dart Programming - Number isOdd Property

void main() { 
   int posNum = 10; 
   print(posNum.isOdd); 
}

Dart Programming - Number isEven Property

void main() { 
   int posNum = 10; 
   print(posNum.isEven); 
} 

Dart Programming - Number sign Property

void main() { 
   int posNum = 10; 
   int negNum = -12;
   int valZero = 0;  
   print(posNum.sign); 
   print(negNum.sign); 
   print(valZero.sign); 
} 

Dart Programming - Number isNegative Property

void main() { 
   int posNum = 10; 
   int negNum = -10; 
   print(posNum.isNegative); 
   print(negNum.isNegative); 
} 

Dart Programming - Number isInFinite Property

void main() { 
   int n = 5000; 
   print(n.isInfinite); 
}  

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.