Uses a switch-case statement to determine what kind of vote has been entered. Displays totals for each.
Created by Phil Gardner
last edited Mar 16 2021 by Phil Gardner
Fast food, fast program…
Example of switch-case statement being used to count up different votes as they are typed in.
Note you can “stack up” cases e.g. capital p and lower-case P together to do the same thing.
Paste code and run in replit.com or compile on a Raspberry Pi, Apple Mac, Linux PC or Windows PC.