The sad thing is this is easy to do too. It's an EASY function.
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
Dictionary<string, int> votes = new Dictionary<string, int>
{
{ "Trump", 100 },
{ "Biden", 1 },
};
Dictionary<string, int> votes2 = new Dictionary<string, int>
{
{ "Trump", 1 },
{ "Biden", 100 },
};
// Call the SwitchVotes function to switch the votes
SwitchVotes(votes, votes2);
// Print the updated votes for names T and B
Console.WriteLine("Votes for T after switching:");
foreach (var kvp in votes)
{
Console.WriteLine($"{kvp.Key}: {kvp.Value}");
}
Console.WriteLine("\nVotes for B after switching:");
foreach (var kvp in votes2)
{
Console.WriteLine($"{kvp.Key}: {kvp.Value}");
}
}
static void SwitchVotes(Dictionary<string, int> votes, Dictionary<string, int> votes2)
{
// Iterate through the keys (names) in the dictionaries
foreach (string name in votes2.Keys)
{
// Swap the votes for the current name between the two dictionaries
int temp = votes[name];
votes[name] = votes2[name];
votes2[name] = temp;
}
}
}
of course there are a couple of more steps, but this little bit of code here, can pull the ol switcherroo.
This takes and switches Trump's 100 votes, and gives that to Biden and drops Trump's votes to 1. We need to do away with machine voting, period.
The sad thing is this is easy to do too. It's an EASY function.
using System; using System.Collections.Generic;
class Program { static void Main() {
}
of course there are a couple of more steps, but this little bit of code here, can pull the ol switcherroo.
This takes and switches Trump's 100 votes, and gives that to Biden and drops Trump's votes to 1. We need to do away with machine voting, period.
Saving this just in case. Darn. I hope everyone sees this and those who need to see this take note.