nodejs knowledge point

2023-01-21   ES  

int FUN (int n) 
 if (n == 0 || n == 1) 
 Return 1; 
 else if (n> 0) 
 Return n * fun (n -1); 

 int Main () 
 int n; 
 scanf ("%d", & n); 
 if (n <0) 
 Printf ("given <0, no value! no value!"); 
 Printf ("%d! =%d", n, fun (n)); 
 Return 0; 

Input format:

Enter the value of an arbitrary integer n.

output format:

If n = 0 or n = 1, then n! = 1; if n <0, output the “given number <0, no value! No value!”.

Input sample:

Here gives a set of inputs. For example:


output sample:

Here gives the corresponding output. For example:



Related Posts

VITE + MOMENT Date Seleator cannot be normally international. You may have imported UMD Chinese package, and VITE only supports ESM dependencies

After class, practice (advancement) 1017. -1+I advance naive “Programming Thinking and Practice” personal learning notes

Unity Common script: PHYSICS

Hibernate’s SaveorUpdate Public Method

nodejs knowledge point

Random Posts

UNIAPP summary of MQTT’s use

zhang-suen detailed algorithm explanation and implementation

date and time type

CS224W diagram neural network learning notes (11) Link Analysis: Pagerank

MAC, Node visits mysql database to report an error