PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
Hitrate_RE
Diff | 1 sec ago
fraisesdesbois
3 sec ago
xss'es
1 min ago
2.2.1 Ejercicio
C++ | 15 sec ago
Untitled
C# | 16 sec ago
CULIONEROS Canela ...
26 sec ago
Untitled
20 sec ago
mcforums
27 sec ago
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None
| size: 0.17 KB | hits: 15 | expires: Never
download
|
raw
|
embed
|
report abuse
Copied
echo "Enter the number to calculate the factorial"
read num
c=$num
fact=$num
for (( c = num; c = 0 ; c-- ))
do
fact = `expr $fact \* ($num-1)`
echo fact
done
create a
new version
of this paste
RAW Paste Data
echo "Enter the number to calculate the factorial" read num c=$num fact=$num for (( c = num; c = 0 ; c-- )) do fact = `expr $fact \* ($num-1)` echo fact done