Task: | Aita |
Sender: | |
Submission time: | 2015-07-18 16:24:51 +0300 |
Language: | C++ |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:14:9: error: 'String' was not declared in this scope String aita = ""; ^ input/code.cpp:16:13: error: 'aita' was not declared in this scope aita += i; ^ input/code.cpp:20:13: error: 'aita' was not declared in this scope aita += i; ^ input/code.cpp:24:21: error: 'aita' was not declared in this scope cout << aita; ^
Code
#include <iostream> #include <stdlib.h> #include <vector> #include <algorithm> using namespace std; int main() { int n, k; cin >> n >> k; String aita = ""; for (int i = 1; i < n + 1; i+= 2) { aita += i; } for (int i = 2; i < n + 1; i+= 2) { aita += i; } if (n != 2) { cout << aita; } else { cout << "QAQ"; } }