답안 #3276

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

#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++;
      	if( tmp==1 ) 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:6:23: error: expected unqualified-id before 'not' token
0.cpp:11:26: error: expected primary-expression before ';' token
0.cpp:14:18: error: expected primary-expression before ')' token
0.cpp:7:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
0.cpp:10:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]