Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- std::cout << "Prosze wpisac liczbe n: ";
- int n, wynik{ 1 }, i{ 2 };
- std::cin >> n;
- while (i <= n) {
- wynik *= i;
- ++i;
- }
- std::cout << "Silnia " << n << " wynosi " << wynik << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement