echo "Enter A Number :"
read n
r=n
s=0
rem=0
while [ $n -gt 0 ]
do
rem=$(($n%10))
s=$(($s+$rem*$rem*$rem))
n=$(($n/10))
done
if [ $r -eq $s ]
then
echo "The Number is Avogadro"
else
echo "The Number is Not Avogadro"
fi
Avogadro's number is a constant. Therefore only one number is equal to Avogadro's number.
cho "Enter A Number :" read n r=n s=0 rem=0 while [ $n -gt 0 ] do rem=$(($n%10)) s=$(($s+$rem*$rem*$rem)) n=$(($n/10)) done if [ $r -eq $s ] then echo "The Number is Avogadro" else echo "The Number is Not Avogadro" fi
#!/bin/sh echo "6.0221415 * 10²³" #!/bin/sh echo "6.0221415 * 10 ^ 23"
k
syntax error
no thanks
see : Write_a_shell_program_using_the_if-the-else_to_test_whether_a_variable_name_is_a_directory_or_a_file
Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.
echo "Program to check even or odd number"echo "Enter a number"read na=`expr $n % 2`if [ $a -eq 0 ] ; then #Semicolon is most important for Executing ifelse statementsecho "It is an even number"elseecho "It is an odd number"fi
Only in hydrogen or helium, because in these two elements only the innermost shell is also the outermost shell.
Number of electrons in outer shell determines thechemical nature of the element and is unique per element. Effective Valence electrons is a calculated ratio between two concentrations of electrons. if n=resisitivity/(e*driftMobility) and n_at=density*Avogadro#/AtomicMass. Effective valence electrons is then n/n_at. Rounding this number should agree with outer shell electrons as predicted from the periodic table.
seq 1 2 99