22 lines
414 B
C
22 lines
414 B
C
#include <stdio.h>
|
|
|
|
int multimes(int n) {
|
|
int i = n;
|
|
int result = 1;
|
|
if (n < 0) goto wow;
|
|
loop:
|
|
result *= i;
|
|
i--;
|
|
if( i > 0 ) goto loop;
|
|
goto ret;
|
|
wow:
|
|
printf("What... You've Jumped here! Your value %d is not appropriate.", n);
|
|
ret:
|
|
return result;
|
|
}
|
|
|
|
int main(){
|
|
int a = 10, b = 5, c = -1;
|
|
printf("%d, %d, %d", multimes(a), multimes(b), multimes(c));
|
|
return 0;
|
|
} |