Go to Post This just goes to prove there was life before FIRST (but it wasn't as much fun!) - Ken Loyd [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-10-2010, 12:22
saworms saworms is offline
Registered User
AKA: Spencer Worms
FRC #2656 (Quasics)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2009
Location: PA
Posts: 2
saworms is an unknown quantity at this point
Even and odd

It is my first day in labview and I need to determine if a number is even or odd.
Can someone please tell me how to do it.

Spencer
Reply With Quote
  #2   Spotlight this post!  
Unread 16-10-2010, 12:49
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Even and odd

Divide by 2, then compare the integer result to the floating point result. If they are equal, it's even.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #3   Spotlight this post!  
Unread 16-10-2010, 12:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Even and odd

Are you having trouble figuring out how to determine if a number is even, or how to implement the algorithm in LabVIEW. Perhaps you could ask more specific problems.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-10-2010, 15:09
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Even and odd

To keep it integer, use the remainder and quotient block. It is similar to the mod() operation in some other languages. If N div 2 has a remainder of 0, it was even.

Greg McKaskle
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another NASA sponsored contest... And look, you can even win a Segway!! Elgin Clock Math and Science 5 17-09-2003 12:26
Even even more Segway stuff. FotoPlasma Dean Kamen's Inventions 1 15-08-2003 22:15
When the even and odd year/team rule will stop. LizJJury Rumor Mill 19 17-04-2003 19:11
OMG were and even number nice!!! Erodge General Forum 6 11-10-2002 17:01
question--- even or odd Greg Perkins Championship Event 2 20-09-2002 19:47


All times are GMT -5. The time now is 21:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi