Napisz funkcję, która znajdzie minimalna z 2 liczb.

Zastosuje funkcję w programie.

#include <iostream>

#include<cstdio>

using namespace std;

int min (int a , int b ) {

if(a<b) return a;

else return b;}

int main(){int x, y;

cout<<"Podaj 2 liczby";

cin>>x >>y;

cout<<"min="<<min(x,y);

cin.ignore();

getchar();

return 0 ;}

#include <iostream>

#include<cstdio>

using namespace std;

int min (int a , int b , int c ) {

if((a<b) && (a<c)) return a;

if((b<c) && (b<a)) return b;

if((c<a) && (c<b)) return c; }

int main(){int x, y, z ;

cout<<"Podaj 3 liczby";

cin>>x >>y>>z;

cout<<"min="<<min(x,y,z);

cin.ignore();

getchar();

return 0 ;}

n!1*2*3*4*…n

n!={ (n-1)! n>/1

{ 1 n=0

rekurencyjna funkcja silnii

long int silnia (int n ) {

if (n= =0) return 1;

else return silnia (n-1)*n; }

%windir%\system32\shutdown.exe -c -t"9999"