int oddCount(n) {
   // your code here
   int oddCounted = 0;
   for(var i = 0; i < n; i++){
     if(i % 2 != 0){
       ++oddCounted;
     }
   }
   return oddCounted;
 }

import 'dart:io';

int oddCount(n) {
  // your code here
  int oddCounted = 0;
  for(var i = 0; i < n; i++){
    if(i.isOdd){
      ++oddCounted;
    }
  }
  return oddCounted;
}
int oddCount(int n) => n ~/ 2;

int oddCount(n) {
  return (n / 2).toInt();
}

int oddCount(n) {
  List x = [];
  for(int i=1; i < n; ++i){
    if(i % 2 !=0){
      x.add(i);
    };
  };
  return x.length;
}