echo 'print 24*60*60,"\n"' | bc
or
echo '86400'
k
syntax error
no thanks
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.
There are many shell programs that will find the sum of the square of individual digits of a number. A small example is: SD=3n=2, sum=2, and SD=2.
There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
31,536,000 seconds
Internal commands are executed by the shell and do not exist as a separate binary program. You can find out which of these there are by looking at the 'man' entry for the shell you are using. External commands can be found in various directories, such as /bin, /usr/bin, etc.
There are 50.5 minutes in 3030 seconds. To find how many minutes are in a given number of seconds, divide the given number by the amount of seconds in one minute.
The greatest number is infinity.
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
The pseudo code would be as follows (you figure out the syntax) 1) Prompt the user to enter a number 2) If entered number is alpha, quit program after displaying message that the user ended the program. 3) Otherwise, find Modulo 2 of the entered number. This is a fancy way of saying "find the remainder when the number is divided by 2) 4) If Modulo 2 is zero, the number is even, otherwise odd 5) Display message showing if the entered number was Even or Odd 6) Branch back to step 1