fork download
  1.  
  2. #include <stdio.h>
  3. #include <math.h>
  4. int main( )
  5. {
  6.  
  7.  
  8. float num, y, a, bin, c, rez; // Создание переменных
  9. printf("введите num :\n"); // вывод текста на экран
  10. scanf("%f",&num ); // Ввод с клавиатуры числа и его запись в переменную x
  11.  
  12. int dec2bin(int num)
  13. {
  14. int bin = 0, k = 1;
  15.  
  16. while (num)
  17. {
  18. bin += (num % 2) * k;
  19. k *= 10;
  20. num /= 2;
  21. }
  22.  
  23. return bin;
  24. }
  25.  
  26. printf("%s \n",bin);
  27.  
  28.  
  29. system("PAUSE");
  30. return 0;
  31.  
  32. }
Success #stdin #stdout #stderr 0s 4704KB
stdin
65421
stdout
введите num :
 
stderr
sh: 1: PAUSE: not found