You are on page 1of 4

public int LastOdd()

{
   int place = 0; 
   for (int i = m; i< arrayNum. Length; i++) 
          if (arrayNum[i] % 2 != 0)
              place = i; 
   return arrayNum[place);
}

public int LastOdd2()


{
   for (int i = arrayNum. Length - 1; i >= 0; i--) 
           if (arrayNum[i] % 2 != 0)
                return arrayNum[i]; 
    return -1;
}
public static void Print(Vote[] arr)

   int[] a = new int[41]; 

   for (int i = 0; i < a.Length; i++)

      a[i] = 0;

    for (int i = 0; i < arr.Length; i++)

     {

       int x1 = arr[i].GetFirst(); 

       int x2 = arr[i].GetSecond();

       int x3 = arr[i].getThird();

   a[xl] = a[x1] + 7; 

   a[x2] = a[x2] + 5; 

   a[x3] = a[x3] + 1;

  }

    int max=0, place=0; 

    for (int i = 0; i < arr.Length; i++)

     {
      if (a[i] > max)

         {

            max = a[i]; 

            place = i;

          }

     }

     Console.WriteLine(place);

}
public class Time
{
  private int hour; 
  private int minute;

  public Time (int hour, int minute)


  {
   if (hour <0 11 hour > 23)
       hour = 0; 
   if (minute <0 minute > 59)
       minute = 0;

   this.hour - hour; 
   this.minute - minute;
  }

public Time (Time t)


  {
   this.hour = t.hour; 
   this.minute - t.minute;
  }
}
public class Flight
 }
  private String name; 
  private String destination; 
  private String flightCode; 
  private Time flight Time;

public Flight (String name, String destination, String lightCode, Time flight Time)
 {
  this.name = name;
  this.destination - destination; 
  this.flightCode - flightCode; 
  this.flight Time - flight Time;

 }

this.flightTime = new Time (flightTime);


public String getName()
 {
  return name;
 }
public boolean isFly()
{
 for (int i = 0; i < flights.length; i++)
  {
     if (this. flights[i].getName().equals("Sky"))
         return true; 
  }
  return false;
}

You might also like