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
Advantages of asp.net mvc framework MVC is a conventional style design that many designers are acquainted with. Some kinds of Web programs will advantage from the MVC structur
You get a contract to implement a simple Java application that process NBA team roster : your application has to read the NBA team roster from a text file and then print each playe
'This program compares interest rates between two banks and determines the best bank 'Eric Weber, Adam Litchfield, Eric Romero, Sarah, Alex, Amy '10/5/12 'Lab #4 Problem 42 'CSC
Characteristics of object-oriented programming: • Emphasis is on data rather than procedure. • Programs are divided into what are known as objects. •
This assignment is an individual programming assignment using Perl. It addresses objectives 3, 4, 5 and 8 as listed in the Subject Outline document. The assignment is based on them
You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our BU04 lab). In this assignment,
Problem Solving 1. Write Pascal code that accepts as input the names of the students, course work score and exam score for a unspecified number of students who have taken a subjec
i have a database having field name title and comm. I want to search by name and get the all data remaining title and comm(comm is integer)
what is intent
The creation of the menu will involve writing procedural code, using decision logic, writing a loop, and using the case statement. Although it is not required for grading, it is r
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