#include <iostream>
struct Cvor{
long long int element;
Cvor *veza;
};
Cvor *KreirajFaktorijelListu(int n){
Cvor *pocetak{}, *prethodni{};
long long int faktorijel = 1;
for(int i= 0; i <= n; i++){
faktorijel *= i;
Cvor *novi = new Cvor{faktorijel, nullptr};
if(!pocetak) pocetak = novi;
else prethodni->veza = novi;
prethodni = novi;
}
return pocetak;
}
int main() {
std::cout << "Hello world!" << std::endl;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: