answersLogoWhite

0

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
5y ago

What else can I help you with?

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


How do you write Avogadro's number in standard numerical notation?

Avogadro's number is written in standard numerical notation as 6.022 × 10²³. This means it is represented as 602,200,000,000,000,000,000,000, which quantifies the number of atoms, ions, or molecules in one mole of a substance.


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