QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#744116#8986. Call for Problemslwl2005Compile Error//C++98254b2024-11-13 20:54:552024-11-13 20:54:55

Judging History

This is the latest submission verdict.

  • [2024-11-13 20:54:55]
  • Judged
  • [2024-11-13 20:54:55]
  • Submitted

answer

#include<stdio.h>
int main()
{
       int n,x,num=0;
       scanf(“%d”,&n);
       for(int i=1;i<=n;i++)
      {
           scanf("%d",&x);
            if(x%2==1)
                  num++;
     }
      printf("%d\n",num);
     return 0;
}

Details

answer.code:5:14: error: extended character “ is not valid in an identifier
    5 |        scanf(“%d”,&n);
      |              ^
answer.code:5:16: error: extended character ” is not valid in an identifier
    5 |        scanf(“%d”,&n);
      |                ^
answer.code: In function ‘int main()’:
answer.code:5:14: error: ‘“’ was not declared in this scope
    5 |        scanf(“%d”,&n);
      |              ^
answer.code:5:16: error: ‘d”’ was not declared in this scope
    5 |        scanf(“%d”,&n);
      |                ^~
answer.code:8:17: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |            scanf("%d",&x);
      |            ~~~~~^~~~~~~~~