|
|
|
|
Re: pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345357 is a reply to message #345351] |
Wed, 03 September 2008 03:32 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
ashok_manian wrote on Wed, 03 September 2008 10:23 | hi forum,
Can anyone tell me how to resolve the below prblm
pl/sql prgm to find the given no is even or odd without using mod or loop fn
|
What's a prblm? What's a prgm? What's a fn?
I _do_ know though what a capital letter is..
The core of this problem is a mathematical one and not a database problem, so you should first work on the algorithm you want to use. Then translate this to SQL or PL/SQL.
|
|
|
Re: pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345360 is a reply to message #345351] |
Wed, 03 September 2008 03:38 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I can think of a few ways to do it.
You could try looking at what MOD does, and come up with a way of doing the same thing, or you could use basic arithmetic and Trunc, or Floor, or Ceil, or you do some other things I just thought of...
At the end of the day, this is homework.
It is there to make you think, and work things out fro yourself.
What will you have learned if we tell you how to do it?
|
|
|
|
|