#include <stdio.h>
#include <math.h>
double limit_a(int x) {
return 1 + (1.0 / x);
}
double limit_b(int n, double a) {
return pow(a, 1.0 / n) - 1;
}
double limit_c(double x) {
return pow(1 + x, 1 / x);
}
int main() {
int x = 1000000; // Large value for x approaching infinity
int n = 1000000; // Large value for n approaching infinity
double a = 2; // Example value for a
printf("Limit (1 + 1/x) as x -> infinity: %.6f\n", limit_a(x));
printf("Limit (a^(1/n) - 1) as n -> infinity: %.6f\n", limit_b(n, a));
printf("Limit (1 + x)^(1/x) as x -> 0: %.6f\n", limit_c(0.000001)); // Small value for x approaching 0
return 0;
}