답안 #3274

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

int main() {
  	int n,i,tmp,cute=0,not=0;
  	scanf("%d",&n);
  	for ( i=0; i<n; i++ ) 
    {
     	scanf("%d",&tmp);
      	if( tmp==0 ) not++;
      	else cute++;
    }
  	if ( cute>not ) printf("Junhee is not cute!\n");
  	else printf("Junhee is cute!\n");
 	return 0; 
}

Compilation message

0.cpp: In function 'int main()':
0.cpp:4:23: error: expected unqualified-id before 'not' token
0.cpp:9:26: error: expected primary-expression before ';' token
0.cpp:12:18: error: expected primary-expression before ')' token
0.cpp:5:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
0.cpp:8:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]