답안 #3279

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
3279 2013-08-30T10:19:09 Z GhostCode 0 = not cute / 1 = cute (kriii1_0) C++
컴파일 오류
0 ms 0 KB
#include <stdio.h>

#define MAX_N 101

void main()
{
	int N=0;
	int input_temp=-1;
	int num_cute=0;
	int num_not_cute=0;

	scanf("%d", &N);

	for(int i=0;i<N;i++)
	{
		input_temp=-1;
		scanf("%d", &input_temp);
		if(input_temp==0) num_not_cute++;
		else if(input_temp==1) num_cute++;
	}
	if(num_not_cute>num_cute) printf("Junhee is not cute!");
	else if(num_not_cute<num_cute) printf("Junhee is cute!");
}

Compilation message

0.cpp:5:11: error: '::main' must return 'int'
0.cpp: In function 'int main()':
0.cpp:12:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
0.cpp:17:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]