Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
237 B
2
Indexable
Never
#include <iostream>
using namespace std;

void fact(){
  int num, i;
  int faxt = 1;
  cout << "Enter A Number: ";
  cin >> num;
  for (i = 1; i <= num; ++i){
    faxt *= i;
  }
  cout << faxt;
}

int main() {
    fact();
    return 0;
}