fibo()
{
num=${1:-100}
n2=1
n1=0
while n=$(( $n1 + $n2 )); [ $n -le $num ]
do
printf "%d " "$n"
n1=$n2
n2=$n
done
echo
}
## The loop continues until the user enters a valid number
while :
do
printf "Enter a number: "
read number
case $number in
*[!0-9]* | "") printf "\a*** Invalid number ***\n" >&2 ;;
*) break ;;
esac
done
fibo "$number"
function fib() { local x y z n; x=1; for n in `seq 1 $1` ; do z=$((x+y)); echo -e "$n\t:\t$z"; x=$y; y=$z; done; }
fib 25
Exactly what do you mean by 'C program in Java'
echo 'print a pattern'
The kernel is the central control program of Unix and the majority of other operating systems.
No, Unix is an operating system program. A utility program cannot run by itself; it runs under an operating system.
You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program. See the related link for an example
You can debug C programs using gdb on Unix.
Too difficult to answer here. I would find the source code and use that (if you really had to). Might require a 'port' to another operating system if it wasn't Unix based.
Unix is inherently portable; this means that a program, script, or process may be moved from Unix system to Unix system with little effort or change (hence - portable).
By typing its name into the shell
Something what the computer executes.
The mini shell program is used in Unix as a programming software. It is a redirected and streamlined approach at creating variables, commands, and tokens.
Obviously. Unix is the original C platform. Also, the original A and B platform. :)