-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdowhileboom.cpp
More file actions
59 lines (41 loc) · 1.11 KB
/
Copy pathdowhileboom.cpp
File metadata and controls
59 lines (41 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// #include <iostream>
// #include <algorithm>
// #include <string>
// #include <cctype>
// using namespace std;
// int main() {
// string firstName, lastName;
// getline(cin, firstName);
// getline(cin, lastName);
// // for(int i=0; i<= firstName.length(); i++){
// // firstName[i] = tolower(firstName[i]);
// // }
// // for(int j=0; j<= lastName.length(); j++){
// // lastName[j] = tolower(lastName[j]);
// // }
// // string username = firstName + lastName;
// // // string ini1 = firstName[0] ;
// // cout << username;
// int i = 0;
// firstName[i] = toupper(firstName[i]);
// int j=0;
// lastName[j] = toupper(lastName[j]);
// cout<< firstName[i] << lastName[j];
// // Create initials (uppercase first letters)
// // Print results
// return 0;
// }
#include <iostream>
using namespace std;
int main() {
string name;
int age;
getline(cin, name);
cin >> age;
if(age>=18){
cout << name << " can vote";
}else{
cout << name << " cannot vote";
}
return 0;
}