Language: C++

#include<iostream>
#include<vector>
int de[8] = {128,62,32,16,8,4,2,1};
double dou[4] = {0.5,0.25,0.125,0.0625};

int main(void){
  while(cin>>in,in){
    vector<int> ans(12,0);
    bool used = false;
    for(int i = 0 ; i < 8 ; i ++){
      if(in>de[i]){
          ans[i] = 1;
          in -= de[i];
          used = true;
      }
    }
    for(int i = 0 ; i < 4 ; i ++){
      if(in>dou[i]){
        if(in>dou[i]){
          ans[i+8] = 1;
          in -= dou[i];
          used = true;
        }
      }
    }
    if(used && in == 0){
      for(int i = 0 ; i < 8 ; i ++)
        cout<<ans[i];
      cout<<".";
      for(int i = 8 ; i < 12 ; i ++)
        cout<<ans[i];
      cout<<endl;
    }else 
      cout<<"NA"<<endl;
    
    
  }
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   while(cin>>in,in){
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:14: error: 'in' was not declared in this scope; did you mean 'int'?
    7 |   while(cin>>in,in){
      |              ^~
      |              int
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> ans(12,0);
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> ans(12,0);
      |            ^~~
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |           ans[i] = 1;
      |           ^~~
      |           abs
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |           ans[i+8] = 1;
      |           ^~~
      |           abs
a.cc:28:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |         cout<<ans[i];
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |         cout<<ans[i];
      |               ^~~
      |               abs
a.cc:29:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   29 |       cout<<".";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:31:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |         cout<<ans[i];
      |               ^~~
      |               abs
a.cc:32:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   32 |       cout<<endl;
      |             ^~~~
      |             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:34:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |       cout<<"NA"<<endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:34:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   34 |       cout<<"NA"<<endl;
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~