#include <stdio.h> #include <math.h> int main( void) { int n, count; double x, y; count = scanf( "%lf%i", &x, &n); printf( "count = %i\n", count); y = pow( x, n); printf( "x = %g, n = %i, y = %g\n", x, n, y); return 0; }
input output ----- ------ count = -1 x = 1.40178e-307, n = 134514009, y = 0 abc count = 0 x = 7.6521e-308, n = 134514009, y = 0 1.1 abc count = 1 x = 1.1, n = 134514009, y = inf 1.1 2 count = 2 x = 1.1, n = 2, y = 1.21
char %c int %i double %lf