Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
3.37K subscribers
1.13K photos
3 videos
17 files
373 links
Main channel https://t.me/Coding_000
Contact Admin 👉 @ILOVEU_143 for booking your exam slots
Web- https://coding000.github.io/Projects/
💯% clearance in any placement exams
OffCampus -https://t.me/Offcampus_000
Discussion- https://t.me/exams_discussion
Download Telegram
int LetteredNumberSum(char* str, int len) {
    if (str == nullptr) {
        return 0;
    }

    int sum = 0;
    for (int i = 0; i < len; i++) {
        char letter = str[i];
        int ans = 0;
//@ILOVEU_143
        switch (letter) {
            case 'A':
                ans = 1;
                break;
            case 'B':
                ans = 10;
                break;
            case 'C':
                ans = 100;
                break;
            case 'D':
                ans = 1000;
                break;
            case 'E':
                ans = 10000;
                break;
            case 'F':
                ans = 100000;
                break;
            case 'G':
                ans = 1000000;
                break;
            default:
                ans = 0;
                break;
        }

        sum += ans;
    }

    return sum;
}

C++
👍2
Start exam late...6:50
Guys i will share Ans here...😊

All the best...❤️👨‍💻
2
Give reactions guys..and share our channel...to get more solutions...❤️😁
👍21🥰1