1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include <stdio.h> #include <conio.h> #include <math.h> void main() { float n; do { printf("\nEnter n = "); scanf("%f", &n); if(n < 1) { printf("Try enter with n is (n >= 1) !"); } }while(n < 1); float i = 1, S = 0; while(i <= n) { S = pow(i + S, 1.0 / (i + 1)); i++; } printf("\nS = %f", S); getch(); } |
