Hello, I have a homework assignment due for my Intro to Programming class, I have no idea what I am doing and wanted some help. I complete it in RAPTOR and generated the C++ code from there, but my professor doesnt want us to do it like that, he wants us to write it ourselves. Can anyone help me translate this from the RAPTOR format? I would really appreciate it.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
?? password;
?? length;
?? index;
?? validpassword;
while (1)
{
raptor_prompt_variable_zzyz ="Please enter your password:";
cout << raptor_prompt_variable_zzyz << endl;
cin >> Password;
validPassword =false;
Length =password'Length;
if (Length<6)
{
cout << "Your password should be at least 6 characters long" << endl; }
else
{
Index =1;
while (1)
{
if (Password(Index)>='0' && Password(Index)<='9')
{
validPassword =true;
}
else
{
Index =Index+1;
}
if (validPassword==true || Index>Length)) break;
}
if (validPassword==true)
{
cout << "Thank you, that is a valid Password!" << endl; }
else
{
cout << "Your password must include at least one digit (1-9)" << endl; }
}
if (validPassword==true)) break;
}
return 0;
}