hello

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
1.2 kB
4
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    char v1 = 'a', v2 = 'e', v3 = 'i', v4 = 'o', v5 = 'u';
    char alp1, alp2, alp3;
    cout << "Enter 1st Alphabet: \n";
    cin >> alp1;
    cout << "Enter 2nd Alphabet: \n";
    cin >> alp2;
    cout << "Enter 3rd Alphabet: \n";
    cin >> alp3;
    while (alp1 == v1 || alp1 == v2 || alp1 == v3 || alp1 == v4 || alp1 == v5) {
        cout << "Alpahbet 1 is a Vowel \n";
        
        if (alp1 != v1 || alp1 != v2 || alp1 != v3 || alp1 != v4 || alp1 != v5) {
            cout << "Alphabet 2 is not a Vowel. \n";
            break;
        }
        while (alp2 == v1 || alp2 == v2 || alp2 == v3 || alp2 == v4 || alp2 == v5) {
        cout << "Alpahbet 2 is a Vowel \n";
        
        if (alp2 != v1 || alp2 != v2 || alp2 != v3 || alp2 != v4 || alp2 != v5) {
            cout << "Alphabet 2 is not a Vowel. \n";
            break;
        }
    }
    while (alp3 == v1 || alp3 == v2 || alp3 == v3 || alp3 == v4 || alp3 == v5) {
        cout << "Alpahbet 3 is a Vowel \n";
        
        if (alp3 != v1 || alp3 != v2 || alp3 != v3 || alp3 != v4 || alp3 != v5) {
            cout << "Alphabet 3 is not a Vowel. \n";
            break;
        }
    }
    }
    
    return 0;
}