1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include <stdio.h> #include <conio.h> #include <math.h> void main() { float n; printf("\nEnter n = "); scanf("%f", &n); float S = 0; while(n--) { S = sqrt((n + 1) + S); } printf("\nS = %f", S); getch(); } |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include <stdio.h> #include <conio.h> #include <math.h> void main() { float n; printf("\nEnter n = "); scanf("%f", &n); float S = 0; while(n--) { S = sqrt((n + 1) + S); } printf("\nS = %f", S); getch(); } |