Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- #define SPACE " "
- using namespace std;
- // Init void
- int maximum(int a, int b);
- double factorielle(int n);
- void puiss2();
- int main(void)
- {
- double fact = factorielle(5);
- cout << fact;
- system("pause");
- return 0;
- }
- int maximum(int a, int b)
- {
- if (a > b) return a;
- return b;
- }
- double factorielle(int n)
- {
- int f = 1;
- for (int i = 1; i < n + 1; i++)
- {
- f *= i;
- }
- return f;
- }
- void puiss2()
- {
- int somme = 0;
- for (int i = 0; i < 3; i++)
- {
- somme += pow(2, i);
- cout << somme;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement