answersLogoWhite

0


Best Answer

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

User Avatar

Lynn Doe

Lvl 6
4y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a shell program to find out the avogadro number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a shell programs for to check whether the given number is an Avogadro number or not?

Avogadro's number is a constant. Therefore only one number is equal to Avogadro's number.


Write a Shell program to find the smallest number from a set of numbers?

k


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


Write a shell program to check and display 10 leap years?

dono


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


Write a shell program to delete all the files in the current directory?

in winxp del *.* /Q /S


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


Write a shell program called whos to display a sorted list of the logged in usersJust display the user names and no other information?

The 'users' command should do that; you don't need to write a shell script to get that information in that format.


Write a Shell program to find the area and circumference of a circle?

echo "Enter the Number" read n r=`expr $n % 2` if [ $r -eq 0 ] then echo "$n is Even number" else echo "$n is Odd number" fi


Write a program which takes any number of days from the user the program should display the number of years number of months formed by these days as well as the remaining days?

Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.