The program allows the user to enter the last names of five candidates is
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string candidate1, candidate2, candidate3, candidate4, candidate5;
int votes1, votes2, votes3, votes4, votes5, totalVotes;
double percentage1, percentage2, percentage3, percentage4, percentage5;
// Prompt user to enter the last name of five candidates
cout << "Enter the last name of five candidates: ";
cin >> candidate1 >> candidate2 >> candidate3 >> candidate4 >> candidate5;
// Prompt user to enter the number of votes received by each candidate
cout << "Enter the number of votes received by each candidate: ";
cin >> votes1 >> votes2 >> votes3 >> votes4 >> votes5;
// Calculate the total number of votes
totalVotes = votes1 + votes2 + votes3 + votes4 + votes5;
// Calculate the percentage of the total votes received by each candidate
percentage1 = (votes1 / static_cast<double>(totalVotes)) * 100
For more questions like Program click the link below:
https://brainly.com/question/13706759
#SPJ4