ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 12.10.2021 16:16:38

ამოცანა: შოკოლადის გაყოფა

მომხმარებელი: Sulkhan

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







     
  int main()
  {
   srand(time(NULL));
     int a = rand();
     int  k = rand() % 100;
     int b = rand();
     


      if(abs((a*b))%k!=0){
           std::cout<<"NO";
           
        
       }else{
           std::cout<<"YES ./n";
           std::cout<<abs((a*b))/k;
  }
  }
PROB_cpp_UID2730PID124_9fd6f4/main.cpp: In function 'int main()':
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:4:15: error: 'NULL' was not declared in this scope
    srand(time(NULL));
               ^~~~
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:4:19: error: 'time' was not declared in this scope
    srand(time(NULL));
                   ^
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:4:20: error: 'srand' was not declared in this scope
    srand(time(NULL));
                    ^
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:5:19: error: 'rand' was not declared in this scope
      int a = rand();
                   ^
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:11:19: error: 'abs' was not declared in this scope
       if(abs((a*b))%k!=0){
                   ^
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:12:12: error: 'cout' is not a member of 'std'
            std::cout<<"NO";
            ^~~
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:16:12: error: 'cout' is not a member of 'std'
            std::cout<<"YES ./n";
            ^~~
PROB_cpp_UID2730PID124_9fd6f4/main.cpp:17:12: error: 'cout' is not a member of 'std'
            std::cout<<abs((a*b))/k;
            ^~~