| | |
Avogadro Number
![]() |
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
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
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!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Hey There,
Here's one way to do it:
Output:
Hope that helps 
, Mike
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
•
•
•
•
$ ./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

, 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!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
No problem. Glad to help 
, Mike

, 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!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Similar Threads
- Projects for the Beginner (Python)
- school sux (Geeks' Lounge)
Other Threads in the Shell Scripting Forum
- Previous Thread: Downloading attachments from an email through a shell script.
- Next Thread: PR Jobs
| Thread Tools | Search this Thread |





