Class Activity 11: Multiple Vectors
-
Due
Feb 26, 2020 by
10am
-
Points
1
-
Available
after Feb 26, 2020 at 9am
Modify the program below so that it generates a random password for each of a list of usernames. (Here's the file version
Download Here's the file version.)
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(){
string charsToInclude;
string password = "";
int passwordLength;
srand(time(0));
cout << "Please enter a string containing all of the characters "
<< "you'd like to sample passwords from: ";
getline(cin, charsToInclude);
cout << "How long should the password be? ";
cin >> passwordLength;
for(int i = 0; i < passwordLength; i++){
password.push_back(charsToInclude[rand()%charsToInclude.size()]);
}
cout << password << endl;
return 0;
}
1582729200
02/26/2020
10:00am
Rubric
Can't change a rubric once you've started using it.
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
Title
Criteria |
Ratings |
Pts
|
This criterion is linked to a Learning Outcome
Description of criterion
threshold:
5 pts
|
5
to >0 pts
Full Marks
blank
|
0
to >0 pts
No Marks
blank_2
|
This area will be used by the assessor to leave comments related to this criterion.
|
pts
/
5 pts
--
|
This criterion is linked to a Learning Outcome
Description of criterion
threshold:
5 pts
|
5
to >0 pts
Full Marks
blank
|
0
to >0 pts
No Marks
blank_2
|
This area will be used by the assessor to leave comments related to this criterion.
|
pts
/
5 pts
--
|
Total Points:
5
out of 5
|