So I was reading from my book "Jumping into C++" doing an exercise for loops in which I had to make a poll with three voting options and in the end would tally the votes and somehow make a bar graph to represent the number of votes if the user enters 0 and would then show it...I assume that we need to use a symbol to represent the vote numbers like * for every vote...this is all i have so if someone knows how to add something like this I would very much appreciate your help
[/c#include <iostream>
#include <string>
usingnamespace std;
int main ()
{
cout << "What do you think of the PS4\n";
int choice,first,second,third;
first = 0;
second = 0;
third = 0;
cout << "1. The PS4 will be the best system\n2. Xbox will be the better system\n3. I'll stay with what I have\n";
cin >> choice;
while (choice ==1 || choice ==2 || choice ==3 || choice==0) {
if (choice ==1) {
first++;
cout << "one vote for PS4 is the best system\n";
cin >> choice;}
if (choice ==2) {
second++;
cout << "one vote for the xbox being better\n";
cin >>choice;}
if (choice ==3) {
third++;
cout << "One vote that you will stay with current gen\n";
cin >> choice;
}
if (choice == 0) {
cout << "Voting has ended" << endl;
break;
}
}
}