program output

raw a diagram showing how the stack is arranged when this program runs. Figure out a password that can make the program output a lucky number.

Assignment The following program takes a password as input but always refuses to generate lottery numbers: #include <iostream> using namespace std; char goodPassword() { int good = ‘N’; char Password[10]; // Memory storage for the password cin>>Password; // Get input from keyboard return (char)good; } int main() { cout<<“Enter your password:”<<endl; if (goodPassword() == ‘Y’) […]

Scroll to top