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
Question 1 What is CISC & RISC? Explain their addressing modes Question 2 Discuss the following- Design Specification of Assembler Design of Single Pass Assembler
Vacation Envy - Travel and Photo Sharing Website Site Overview- Vacation Envy is a travel as well as photo-sharing site. Make your travel map, share photos and show off al
Write a function drawCA(aname, coords) that uses the plot3 command to draw the C α backbone of the protein. When calling this function, you should pass in the aname and coords var
In this Project your task is to create a program that displays various levels of the fractal structure of the so called square shaped Sierpinski-carpet. The display of level 4 is s
The standard way for debuggers to plant interactive breakpoints in a program in RAM (whatever the processor instruction set) is to save the break pointed instruction and replace it
Write a Perl program ghici.pl, one of the simplest computer games. The program should generate a random integer between 1 and 1000 and asks the user to guess it. If the user ?nds t
Your solution to the problem should be housed within a while loop, which allows the grader to test your solution repeatedly without having to re-execute the script, as shown in cla
Pascal program: Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you: 1. The gener
Expertsmind brings you unique solution in java assignments Networking The term system selection represents composing applications that do across several gadgets (computers
Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrement
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