0
Solution To Alphabet Test Question
I'm learning C++ and I'm stuck at arrays, probably the first coding test on arrays. --Alphabet-- I wrote the code and after running it, Test Case 1 & 2 were alright yet the code is declared to be wrong. Anyone who's dealt with it should kindly sort me out please🙏🙏
2 ответов
+ 3
Can you share the code?
0
Sorry for the late reply although I need help. I'm financially unstable and haven't bought data packet for the past 3 days. Btw, this is the code
#include <iostream>
using namespace std;
int main() {
char letters[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int input;
cin >> input;
cout << "It corresponds to " << letters[input];
}
This is the code to which I seek corrections and guidance. Thank you