[ create a new paste ] login | about

Link: http://codepad.org/FQiNhYov    [ raw code | output | fork ]

C, pasted on Feb 5:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
   double base = 2.0;
   double exp = 4.0;
   double result = pow(base, exp);
   
   printf ("Result = %.2lf\n", result);
   return 0;
}


Output:
1
Result = 16.00


Create a new paste based on this one


Comments: