Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Bài 6: Tính giai thừa
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,i;
- long long gt;
- cout << "Nhap vao a: ";
- cin >> a;
- gt = 1;
- for (i = 1; i <= a; i++)
- {
- gt = gt*i;
- }
- cout << a << "! = " << gt << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement