Home » Other » Training & Certification » pl/sql prgm to find the given no is even or odd without using mod or loop fn (merged)
pl/sql prgm to find the given no is even or odd without using mod or loop fn (merged) [message #344485] Sat, 30 August 2008 00:31 Go to next message
ashok_manian
Messages: 3
Registered: August 2008
Junior Member
hi forum,,

Can anybody give me a solution in order to print the given no is even or odd without using mod or loop function....

Regards

santhosh

[EDITED by LF; trying to clean up merged threads]

[Updated on: Wed, 03 September 2008 07:43] by Moderator

Report message to a moderator

Re: pl/sql program to accept a number in order to find a given no is even or odd without using mod [message #344523 is a reply to message #344485] Sat, 30 August 2008 03:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As I said: read OraFAQ Forum Guide, post the requested information, post what you tried.

Regards
Michel
pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345351 is a reply to message #344485] Wed, 03 September 2008 03:23 Go to previous messageGo to next message
ashok_manian
Messages: 3
Registered: August 2008
Junior Member
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
Re: pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345354 is a reply to message #345351] Wed, 03 September 2008 03:28 Go to previous messageGo to next message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Why you need that??

We are not suppose to do your homework.


Regards,
Rajat
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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?
Re: pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345380 is a reply to message #345351] Wed, 03 September 2008 04:59 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
duplicate post
Re: pl/sql prgm to find the given no is even or odd without using mod or loop fn [message #345398 is a reply to message #345380] Wed, 03 September 2008 07:01 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Merged. Wink

Regards
Michel
Previous Topic: Oracle certification
Next Topic: Learning Webutil components
Goto Forum:
  


Current Time: Thu Mar 28 17:00:34 CDT 2024