473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A Factorial And Combination Programming

A Factorial And Combination Programming
--------------------------------------------------------------------------------

GUYS GOOD AFTERNOON,,

PLS help me in my project it goes:
Write a program that accepts 2 values n and r and display the value of
a.)P(n,r)
b.)C(n,r)
it is about in permutation and combination.
it will be past today please help me guys have mercy on me..

--------------------------------------------------------------------------------
Feb 26 '08 #1
3 2301
gpraghuram
1,275 Expert 1GB
A Factorial And Combination Programming
--------------------------------------------------------------------------------

GUYS GOOD AFTERNOON,,

PLS help me in my project it goes:
Write a program that accepts 2 values n and r and display the value of
a.)P(n,r)
b.)C(n,r)
it is about in permutation and combination.
it will be past today please help me guys have mercy on me..

--------------------------------------------------------------------------------
Please dont double post

Raghu
Feb 26 '08 #2
Meetee
931 Expert Mod 512MB
A Factorial And Combination Programming
--------------------------------------------------------------------------------

GUYS GOOD AFTERNOON,,

PLS help me in my project it goes:
Write a program that accepts 2 values n and r and display the value of
a.)P(n,r)
b.)C(n,r)
it is about in permutation and combination.
it will be past today please help me guys have mercy on me..

--------------------------------------------------------------------------------
This is a mathematical calculation for n!/r!*(n-r)! and n!/(n-r)! For factorial, you need to have a loop in which multiplication will be done. Please post your efforts and must read posting guidelines.

Regards
Feb 26 '08 #3
hsriat
1,654 Expert 1GB
Aww... I'm not too good in C++, else I could have helped you.
See this if it helps you somewhat in designing a logic.
Mar 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
33
by: patrick_woflian | last post by:
hey guys, im just writing a basic calculation at the moment, before building on it for an A-Level piece of work. i can add/divide etc... two numbers together yet i am having a major problem with...
35
by: aNt17017 | last post by:
This is my code: long fact(int n) { if (n == 0) return(1); if(n > 100) { printf("\t\tERROR: %d is too large for factorial.\n", n); return 1;
8
by: salman | last post by:
this program is giving compile time error. so plse ge me the logic of factorial # include <iostream.h> # include <math.h> void main() { int f,sum=0,i,j,n; cout<<"\nEnter Number: ";
59
by: Umesh | last post by:
i wrote the following program to calculate factorial: #include<stdio.h> #include<iostream.h> void main() { int i,n; long int p=1; // or long double p=1; for exponential result which I don't...
3
by: Sugandh Jain | last post by:
Hi. How to write a function that will return me the factorial (say in a string) for the any positive integer it takes? When we find a factorial of even say 2000 or a higher number, it will be...
0
kadghar
by: kadghar | last post by:
Hi, I saw that Killer posted a simple Factorial Function that allows you to calculate up to 13!, well, you can use this for bigger numbers by changing the variable type. Why is this? You can...
1
by: doctor309 | last post by:
hello friends iam not able to get logic behind solving the question mentioned below,,,,i tried a lot using various books.....online tutorials but at the end just lost it...... you ppl are kindly...
2
by: becky808 | last post by:
Hi, I'm trying to write a program to calculate n factorial but it won't compile. Can anyone tell me what I'm doing wrong? #include <iostream> #include <cmath> using namespace std; int...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.