A better one

int hourMinuteHandInRight = 0;

int hourMinuteHandInLeft = 0;

int interval = 60;

int rightHand = 180 – interval;

int leftHand = 540 – interval;

while (hourMinuteHandInRight < 12 && hourMinuteHandInLeft < 12)

{

rightHand += interval;

if (rightHand == 660)

{

rightHand = 0;

hourMinuteHandInRight++;

}

Console.WriteLine("{0}:{1}", hourMinuteHandInRight, (int)(rightHand / 11));

hourMinuteHandInRight++;

leftHand += interval;

if (leftHand >= 660)

{

hourMinuteHandInLeft++;

leftHand = 0;

}

Console.WriteLine("{0}:{1}", hourMinuteHandInLeft , (int)(leftHand / 11));

hourMinuteHandInLeft++;

}

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s