fork download
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main(int argc, char * argv[]){
  4. int n=2025;
  5. //printf("please give a number");
  6. //scanf("%d",&n);
  7. int i=0;
  8. char hex[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}, res[10];
  9. while(n!=0){
  10. res[i]=hex[n%16];
  11. n/=16;
  12. i++;
  13. }
  14. i--;
  15.  
  16. while(i>=0){
  17. printf("%c\t",res[i]);
  18. i--;
  19. }
  20. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
7	E	9