Submission #20067

# Submission time Handle Problem Language Result Execution time Memory
20067 2016-02-25T09:09:04 Z sui if-else 문 1 (BSC_0_8) C++14
Compilation error
0 ms 0 KB
#include <iostream>
using namespace std;

#include <vector>
#include <stack>
#include <cassert>







int main() {

	int x; cin >> x;

	puts(x ? "nonzero" ? "zero");

	return 0;
}

Compilation message

if1.cpp: In function ‘int main()’:
if1.cpp:18:29: error: expected ‘:’ before ‘)’ token
  puts(x ? "nonzero" ? "zero");
                             ^
if1.cpp:18:29: error: expected primary-expression before ‘)’ token
if1.cpp:18:29: error: expected ‘:’ before ‘)’ token
if1.cpp:18:29: error: expected primary-expression before ‘)’ token