Submission #715038

# Submission time Handle Problem Language Result Execution time Memory
715038 2023-03-25T21:26:36 Z The_Cat_Person Kamenčići (COCI21_kamencici) C++14
Compilation error
0 ms 0 KB
#include <iostream>

using namespace std;
int n;
cin >> n;
int k;
cin >> k;
string pebbles;
cin >> pebbles;

int main()
{
    int a = 5
    int b = 0
    if (a==k)
    {
      cout << "NE";
    }
  	if (b==k)
    {
      cout << "DA";
    }
  	
    return 0;
}

Compilation message

Main.cpp:5:1: error: 'cin' does not name a type
    5 | cin >> n;
      | ^~~
Main.cpp:7:1: error: 'cin' does not name a type
    7 | cin >> k;
      | ^~~
Main.cpp:9:1: error: 'cin' does not name a type
    9 | cin >> pebbles;
      | ^~~
Main.cpp: In function 'int main()':
Main.cpp:14:5: error: expected ',' or ';' before 'int'
   14 |     int b = 0
      |     ^~~
Main.cpp:19:8: error: 'b' was not declared in this scope
   19 |    if (b==k)
      |        ^
Main.cpp:13:9: warning: unused variable 'a' [-Wunused-variable]
   13 |     int a = 5
      |         ^