Answer to Question #298447 in C++ for Srilekha

Question #298447

First line contains an integer M, The number of district alphabet he is addicted to

1
Expert's answer
2022-02-16T08:10:28-0500
#include <iostream>


int main()
{
    int m = 0;
    std::cout << "Enter value from 1 to 26 : ";
    std::cin >> m;
    if (m < 1 || m>26)
    {
        std::cout << "Wrong value\n";
        system("pause");
        return 0;
    }




    std::cout << "Letter number " << m << " is " << (char)(m-1 + 'a') << std::endl;
    system("pause");
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog