SHOW:
|
|
- or go back to the newest paste.
1 | - | #include <stdio.h> |
1 | + | #include<stdio.h> |
2 | - | #include <math.h> |
2 | + | #include<math.h> |
3 | main() | |
4 | { | |
5 | - | float e; |
5 | + | float x,n; |
6 | - | int x, n; |
6 | + | for(n=2;n<=10;n++) |
7 | - | printf("numero a ser calculado\n"); |
7 | + | for(x = 1; n > 1;n = n - 1) |
8 | - | scanf("%d", &n); |
8 | + | x= x*n; |
9 | - | for(x = 1; n > 1;n = n - 1) |
9 | + | printf("\nFatorial calculado: %f",x); |
10 | - | x= x*n; |
10 | + | return 0; |
11 | - | printf("\nFatorial calculado: %d",x); |
11 | + |