Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each of the following questions, find the inputs and outputs, write the pseu

ID: 3688932 • Letter: F

Question

For each of the following questions, find the inputs and outputs, write the pseudocode,desk check the pseudocode create the flowchart and code the solution in C++

.1.Kevin wants a program to total the votes each district in his state cast for the independent delegate running in a given election. There are 10 districts, so he wants a program that will allow him to enter the number of votes each district had for that candidate. The program will then calculate the total number of votes cast for the independent candidate and display this total

.

Explanation / Answer

#include<iostream.h>
#include<stdlib.h>

void main()
{
   int votes[10],i,s=0;

   for(i=0;i<10;i++)
   {
       cout<<"Enter votes for "<<i+1<<"District";
       cin>>votes[i];
       s=s+votes[i];  
   }

   cout<<"Total votes of 10 Districts ="<<s;
   system("pause");
}

input

400

500

500

500

500

400

400

400

500

500

output

Total votes of 10 Districts =4600

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote