Question: PICTURE SHOWS error when submitting for grading what needs to be fixed on this code??? please look at code and pictures posted. Thank You! #include

PICTURE SHOWS error when submitting for grading what needs to be fixed on this code??? please look at code and pictures posted. Thank You!
#include
#include
using namespace std;
#define MAX_LEN 100
bool is_vowel(char c){
return (c =='a'|| c =='e'|| c =='i'|| c =='o'|| c =='u');
}
void encode_password(char password[], int key){
int len = strlen(password);
for (int i =0; i len; i++){
if (!is_vowel(password[i])){
password[i]=((password[i]-'a'+ key)%26)+'a';
}
}
for (int i =0; i len /2; i++){
char temp = password[i];
password[i]= password[len - i -1];
password[len - i -1]= temp;
}
cout password endl;
}
int main(){
char password[MAX_LEN];
int key;
cin >> password;
cin >> key;
encode_password(password, key);
return 0;
}
CODE MUST SATISFY THESE OUTPUTS:
input:
password
4
output:
hvoawwat
input:
mybirthday
12
output:
kaptfdinky
input:
secretpzwrd
0
output:
drwzpterces
input:
onetwothree
26
output:
eerhtowteno
Passwords are encoded before they are stored in the database. Write a program that takes a simple password and a key, and encodes the password. All the consonants, NOT the vowels, will increase to the character specified by the key. If any character is more than 'z' after increasing, it will restart at 'a'. Then the whole string is reversed and stored in the database. You can assume all the characters are lowercase.
PICTURE SHOWS error when submitting for grading

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!