Cheeel666

Untitled

Sep 10th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. /*
  2. int flag = 0, z = -1;
  3. char temp[50] = {NULL};
  4. temp[0] = '0';
  5. temp[1] = '.';
  6. int i = 0;
  7. while (num1[i] != NULL)
  8. {
  9. i++;
  10. if (num1[i] == '.')
  11. flag = 1;
  12. if (flag)
  13. z++;
  14. }
  15. if (flag)
  16. {
  17.  
  18. }
  19. else
  20. {
  21. for (int k = 0; k < i; k++)
  22. {
  23. temp[k + 2] = num1[k];
  24. }
  25. temp[i + 2] = 'e';
  26. if (i < 10)
  27. temp[i+3] = i+48;
  28. else
  29. {
  30. int k = 0, temp1 = i, n = 0;
  31. char t[5] = {-1};
  32. while (i!=0)
  33. {
  34. k = i % 10;
  35. t[n] = k+48;
  36. i = i / 10;
  37. n++;
  38. }
  39. k = 3;
  40. while (i < 5)
  41. {
  42. if (t[4-i] != NULL)
  43. {
  44. temp[temp1 + k] = t[4-i];
  45. k++;
  46. printf("\nTEST\n %d", t[4-i]);
  47. }
  48. i++;
  49. }
  50.  
  51. }
  52. }
  53. printf("TEST:\n");
  54. puts(temp);
  55. */
Advertisement
Add Comment
Please, Sign In to add comment