Compile Error
foo.c: In function 'main': foo.c:10:5: error: 'count' undeclared (first use in this function) 10 | count++; | ^~~~~ foo.c:10:5: note: each undeclared identifier is reported only once for each function it appears in foo.c:10:5: error: expected declaration or statement at end of input
Code
#include <stdio.h>
int main(){
int M;
for(int i=0;i<M;i++);
char str[20];
scanf ("%d",M);
int len=strlen(str);
for(int i;str[i]!='\0';i++)
if (str [i]=='M'||str[i]=='e')
count++;
Information
- Submit By
- Type
- Submission
- Problem
- P1227 LUCC Party Check-in
- Contest
- LUCC Presents Kick & Code Intra LU Programming Contest
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-09-01 06:01:00
- Judged At
- 2025-09-01 06:01:00
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes