[ create a new paste ] login | about

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

C, pasted on Mar 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<stdio.h>
#include<string.h>
#include<math.h>

int main() {
    char c[10]="EE";
    //scanf("%s",&c);
    int i, sum=0;
    for(i=0;i<strlen(c);i+1){ 
                     if('A'<=c[i]&&c[i]<='F')c[i]+=10-'A';
                     else c[i]-='0';
                     sum=sum+c[i]*pow(16,strlen(c)-1-i);
    }
    
    printf("10진수 변환:  %d\n",sum);
    
    return 0;
}


Output:
1
2
In function `main':
undefined reference to `pow'


Create a new paste based on this one


Comments: