From 61dce3529af81ec43e35c13fc8b91d551d2ff95b Mon Sep 17 00:00:00 2001 From: copycode69 Date: Mon, 16 Dec 2024 21:20:00 +0530 Subject: [PATCH] Replaced and with && --- 3-conditionals/17_voting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-conditionals/17_voting.cpp b/3-conditionals/17_voting.cpp index dec5351..9ebaa34 100644 --- a/3-conditionals/17_voting.cpp +++ b/3-conditionals/17_voting.cpp @@ -8,7 +8,7 @@ int main() { bool citizen = true; bool registered = false; - if (age >= 18 and citizen == true and registered == true) { + if (age >= 18 && citizen == true && registered == true) { // Use '&&' instead of 'and' std::cout << "You can vote!\n"; } else if (age < 18) {