Avogadro Number

Reply

Join Date: Apr 2008
Posts: 7
Reputation: man5237 is an unknown quantity at this point 
Solved Threads: 0
man5237 man5237 is offline Offline
Newbie Poster

Avogadro Number

 
0
  #1
Oct 9th, 2008
Shell program to check whether a given number is avogadro number or not.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Avogadro Number

 
0
  #2
Oct 9th, 2008
Hey there,

Did you want to do some calculation against the constant or just determine if a number is avogadro's number or not? If so, all you have to do is test whether or not the number equals the number (6.022 x 10 to the 23rd power).

I'm probably missing something. If you could explain further, maybe I can help.

Best wishes,

Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 7
Reputation: man5237 is an unknown quantity at this point 
Solved Threads: 0
man5237 man5237 is offline Offline
Newbie Poster

Re: Avogadro Number

 
0
  #3
Oct 9th, 2008
Just determine.

That's all.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Avogadro Number

 
0
  #4
Oct 10th, 2008
Hey There,

Here's one way to do it:

#!/bin/bash

echo -n "Enter your number: "
read answer

if [ "$answer" == "6022000000000000000000000" ]
then
echo "You picked the Avogadro Number! $answer"
else
echo "That number isn't the Avogadro Number!"
fi
Output:

$ ./av.sh
Enter your number: 3120280138
That number isn't the Avogadro Number!

$ ./av.sh
Enter your number: 6022000000000000000000000
You picked the Avogadro Number! 6022000000000000000000000
Hope that helps

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 7
Reputation: man5237 is an unknown quantity at this point 
Solved Threads: 0
man5237 man5237 is offline Offline
Newbie Poster

Re: Avogadro Number

 
0
  #5
Oct 10th, 2008
Thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Avogadro Number

 
0
  #6
Oct 11th, 2008
No problem. Glad to help

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC