Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DoubleNumber.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- return 0;
- }
- #include <iostream>
- using namespace std;
- void login()
- {
- cout << "Login Successful." << endl;
- }
- void rejectlogin()
- {
- cout << "Login Incorrect." << endl;
- }
- void password()
- {
- cout << "Please Enter Your Numerical Password." << endl;
- int password;
- cin >> password;
- int correct_password;
- correct_password = 8876;
- if (password == correct_password)
- {
- login();
- }
- else
- {
- rejectlogin();
- }
- }
- int main()
- {
- cout << "Please Enter Your Student Number." << endl;
- int username;
- cin >> username;
- int correct_username;
- correct_username = 1162888;
- if (username == correct_username)
- {
- password();
- }
- while (username != correct_username)
- {
- rejectlogin();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment