Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Find nCr.
Program
echo -e "Enter n: \c"
read n
echo -e "Enter r: \c"
read r
i=2
nf=1
temp=`expr $n - $r`
tf=1
rf=1
ncr=1
while test $i -le $n
do
nf=`expr $nf\*$i`
i=`expr $i + 1`
done
nf=`echo "$nf" | bc`
while test $i -le $temp
tf=`expr $tf\*$i`
tf=`echo "$tf" | bc`
while test $i -le $r
rf=`expr $rf\*$i`
rf=`echo "$rf" | bc`
temp2=`echo "$nf / $tf" | bc`
ncr=`echo "$temp2 / $rf" | bc`
echo "nCr = $ncr"
Output
sh ncr.sh
Enter n: 5
Enter r: 4
nCr = 5
Enter n: 9
nCr = 126
Enter n: 12
Enter r: 5
nCr = 792
Your task will be to code a simulation of image compression based on the approximate low rank structure of the set of image patches. You will write functions .code = my block compr
(a) Define a procedure called make-avl-tree which makes an AVL tree with one node. Also create another constructor build-avl-tree that creates an AVL tree from a root, left subtree
Example : Find the general solution to the subsequent differential equation. x 2 y′′ - 7 xy′ + 16 y= 0 Solution First the roots of (3) r (r -1) - 7r + 16= 0 r 2
Note: You should pay attention on following good practices: Appropriate code comments(If you make any assumptions clearly comment them in the code) Indentation
Determine the address accessed by each of the following instruction if DS=1100H, BX=0200H, LIST=0250H AND SI=0500H-: 1) MOV LIST[SI],EDX?0250+0500+11000=11750 2
i have a homework in TinyOs
This is Python program I am stuck Modify the Russian peasant multiplication mod n function from class to perform "Russian peasant exponentiation" instead. You can assume that you
I have assignment about python language . Could you helpe me to built it
I need a program that writes the first column of the matrix. The numbers in this column follow the pattern below: 1. Numbers start at 1 and count up to ''nels'' in increments of
We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd