Task: | Osajono |
Sender: | BigKappa |
Submission time: | 2015-10-02 10:41:41 +0300 |
Language: | C++ |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:7:9: error: storage size of 'm' isn't known char m[]; ^ input/code.cpp:18:2: error: expected '}' at end of input } ^
Code
#include <iostream>#include <string.h>using namespace std;int main() {char m[];cin >> m;int n = strlen(m);int o = n;for (int l = 1; l <= n; l++){for( int i = 0; i <= n-l;i++){if(m[i] == m[i+l]){o++;}}return o;}