Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by kris ( 14 years ago )
#include "stdafx.h"
#include <iostream>
using namespace std;

void silnia(int *wsk)
{
int w=1;
for(int i=1;i<=*wsk;i++)
w=w*i;
cout<<w;

}
void policz(int *wsk1,int *wsk2)
{
double wyn;
wyn=silnia(*wsk1)/(silnia(*wsk2)*silnia(*wsk1-*wsk2));
cout<<wyn;

}
int _tmain(int argc, _TCHAR* argv[])
{
int k,n;
cout<<"Podaj n: ";
cin>>n;
cout<<"Podaj k: ";
cin>>k;
silnia(&k);
cout<<endl;
silnia(&n);
policz(&n,&k);

system&#40;"pause"&#41;;
}

 

Revise this Paste

Your Name: Code Language: