Mode:
Duration:
1
2
3
4
5
proc factorial(n: int): int {
if n == 0 then return 1;
return n * factorial(n-1);
}
writeln(factorial(5));Coding works best on desktop or with an external keyboard.
proc factorial(n: int): int {
if n == 0 then return 1;
return n * factorial(n-1);
}
writeln(factorial(5));Coding works best on desktop or with an external keyboard.
Calculates factorial of a number using recursion.
proc factorial(n: int): int {
if n == 0 then return 1;
return n * factorial(n-1);
}
writeln(factorial(5));Chapel is a parallel programming language designed for high-performance computing (HPC). Developed by Cray Inc., it provides productivity features for writing scalable and portable parallel programs, combining high-level abstractions with fine-grained control over concurrency and data distribution.
Origin & Creator
Developed by Cray Inc. as part of the Cray Cascade project, first released in 2009.
Industrial Note
Chapel is mainly used in research, supercomputing centers, and scientific computing environments requiring scalable parallel execution.