Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- double faktorijel = 1;
- int broj;
- cout << "Unesite broj od kojeg zelite izracunati faktorijel. ";
- cin >> broj;
- for (int i = 1; i <= broj; i++) faktorijel *= i;
- cout << "Faktorijel broja " << broj << "! iznosi: " << faktorijel;
- system("pause > nul");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment