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

please help ....i need the inputs ...the output...the pseudocode the desk check

ID: 3689757 • Letter: P

Question

please help ....i need the inputs ...the output...the pseudocode the desk check and the flowchart for these two problems

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

2. A company wants a system to compute an employee's end - of - year bonus and then output the employee's n ame, yearly salary, performance rating and bonus. The bonus is based on rating received and salary as shown in the table below. The program should allow the company to enter as many employees as they wish and to display the average of the bonus es given to the employees . The program will quit if a given sentinel value is entered.

Rating Bonus

1                                          25 percent of the yearly salary

2                                          15 percent of the yearly salary

3                                          10 percent of the yearly salary

4 No bonus given

Explanation / Answer

1.

#include<iostream.h>
#include<conio.h>

void main()
{
   string name[5];
   int votes[5],i,ind,tot=0;

   for(i=0i<5;i++)
   {
       cout<<"Enter name";
       cin>>name[i];

       cout<<"Enter votes";
       cin>>votes[i];
       tot=tot+votes[i];

   }
  
   for(i=0;i<5;i++)
   {
       cout<<name[i]<<" "<<votes[i]<<" "<<tot/votes[i]<<endl;
   }
   cout<<"Total"<<tot;
   int max=0;

   for(i=0;i<5;i++)
   {
       if(votes[i]>max)
       {
           max=votes[i];
           ind=i;
       }
   }
   cout<<The Winner of the Election is "<<name[ind];
   getch();
}
  

2.

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

void main()
{
   int i=0;
   double b[100],s=0,av;
   char ans='y';

   struct emp
   {
       char name[20];
       int year;
       double salary;
       int rate;
   {
   struct emp o[100];

   while (ans=='y')
   {
      
       cout<<"Enter name";
       cin>>o[i].name;

       cout<<"Enter year";
       cin>>o[i].year;

       cout<<"Enter salary";
       cin>>o[i].salary;

       cout<<"Enter rating";
       cin>>o[i].rate;

       if(o[i].rate==1)
       {
           b[i]=o[i].salary*25/100;
       }
       if(o[i].rate==2)
       {
           b[i]=o[i].salary*15/100;
       }
       if(o[i].rate==3)
       {
           b[i]=o[i].salary*10/100;
       }
       if(o[i].rate==1)
       {
           b[i]=0;
       }
       s=s+b[i];  
       cout<<"Do you want to continue[y/n]?";
       cin>>ans;
   }
   av=s/i;
   cout<<"Average of Bouns"<<av;
   system("pause");
}