I really need help with this:

develop an algorithm pseudo-code that will accept the names of each sales staff members and their total sales for the month. The algorithm must calculate the commission at 4 % of their total sales amount. It should display only the name, total sales and commission of the member with the highest commission and the number of persons without commission. ]]>

Sorry if this is poorly discribed, I have attatched my project's word document if you need further details. Thanks again

```
#include <iostream>
#include <cmath>
#include <iomanip>
#include <Windows.h>
#include <fstream>
using namespace std;
void readit();
void calcit(char[10][6], char[3][6], char a, char b, char c, char d);
void writeit(int score1, int score2, int score3);
int main()
{
readit();
return 0;
}
void readit()
{
char candidate[10][6], target[3][6], a, b, c, d;
ifstream candidates("D:\\School\\C++ Programs\\Project 3\\candidates.txt");
ifstream targets("D:\\School\\C++ programs\\Project 3\\targets.txt");
//Declaring the format of table
for (char a = 0; a < 10; a++)
for (char b = 0; b < 6; b++)
{
//Declaring format of table "candidate"
candidates >> candidate[a][b];
}
for (char c = 0; c < 3; c++)
for (char d = 0; d < 6; d++)
{
//Declaring format of table "target"
targets >> target[c][d];
}
calcit(candidate, target, a, b, c, d);
}
void calcit(char candidate[10][6], char target[3][6], char a, char b, char c, char d)
{
int score1 = 0, score2 = 0, score3 = 0;
//Stating that all candidates and the first row of targets are to be compared
//and the absolute value is to be found
for (char a = 0; a < 10; a++)
for (char b = 0; b < 6; b++)
for (char c = 0; c < 1; c++)
for (char d = 0; d < 6; d++)
score1 = score1 + abs(b - d);
////Stating that all candidates and the second row of targets are to be compared
//and the absolute value is to be found
for (char a = 0; a < 10; a++)
for (char b = 0; b < 6; b++)
for (char c = 1; c < 2; c++)
for (char d = 0; d < 6; d++)
score2 = score2 + abs(b - d);
//Stating that all candidates and the third row of targets are to be compared
//and the absolute value is to be found
for (char a = 0; a < 10; a++)
for (char b = 0; b < 6; b++)
for (char c = 2; c < 3; c++)
for (char d =0; d < 6; d++)
score3 = score3 + abs(b - d);
writeit(score1, score2, score3);
}
void writeit(int score1, int score2, int score3)
{
//This table is not finished, trying to find the correct answer before continuing
cout << " Target Candidate Score";
cout << "---------------------------------------";
cout << score1 << endl;
cout << score2 << endl;
cout << score3 << endl;
}
```

]]>Thank you for your time.

this is entire code:

```
import matplotlib.pyplot as plt
import numpy as np
# discretization of domain
x_start, x_end = 0. , 10.
y_start , y_end = 0. , 8.
i = np.linspace(x_start, x_end, 80)
j = np.linspace(y_start, y_end, 50)
X,Y = np.meshgrid(i,j)
Y[:,:40] += 1
Dx = x_end/(np.size(i)-1)
Dy = y_end/(np.size(j)-1)
beta = Dx/Dy
nx = np.size(i) #number of points on x axis
ny = np.size(j) #number of points on y axis
#matrix
nk = nx*ny
A = np.zeros([nk, nk])
B = np.zeros([nk,1])
# solving
for i in range (nx):
for j in range (ny):
k = j*nx + i
if i == 0: # left edge
k1 = j*nx + 1
k0 = j*nx + 0
A[k,k1] = 1
A[k,k0] = -1
B[k] = Dx
elif i == nx-1: # right edge
k_1 = j*nx + (nx-1)
k_2 = j*nx + (nx-2)
A[k,k_2] = -1
A[k,k_1] = 1
B[k] = Dx
elif j == 0: # bottom
K1 = nx + i
K0 = i
A[k,K0] = -1
A[k,K1] = 1
B[k] = 0
elif j == ny-1: # topper
K_1 = (ny-1)*nx + i
K0 = (ny-2)*nx + i
A[k,K_1] = 1
A[k,K0] = -1
B[k] = 0
else: # middle
k_top = (j+1)*nx + i # fi i,j+1
k_down = (j-1)*nx + i # fi i,j-1
k_left = j*nx + (i-1) # fi i-1,j
k_right = j*nx + (i+1) # fi i+1,j
A[k,k_top] = beta**2
A[k,k_down] = beta**2
A[k,k_left] = 1
A[k,k_right] = 1
A[k,k] = -2*(1+beta**2)
B[k] = 0
sol_vec = np.linalg.solve(A,B)
fi = np.reshape(sol_vec,(ny,nx))
# u and v
u = np.zeros([ny,nx])
v = np.zeros([ny,nx])
# velocity u i v
for i in range(nx):
for j in range (ny):
if i == 0: # left edge
v[j,i] = 0
u[j,i] = (fi[j,i+1] - fi[j,i])/Dx
elif i == nx-1: # right edge
v[j,i] = 0
u[j,i] = (fi[j,i] - fi[j,i-1])/Dx
elif j == 0: # bottom, 'v'
v[j,i] = 0
elif j == ny-1: # topper, 'v'
v[j,i] = 0
else: # middle
u[j,i] = (fi[j,i+1] - fi[j,i-1])/(2*Dx)
v[j,i] = (fi[j+1,i] - fi[j-1,i])/(2*Dy)
for i in range (1,nx-1):
u[0,i] = (fi[j,i+1] - fi[j,i-1])/(2*Dx) # 'u'
u[-1,i] = (fi[j,i+1] - fi[j,i-1])/(2*Dx)
u[15,40] = 0
v[15,40] = 0
plt.figure()
plt.quiver(X,Y,u,v)
plt.streamplot(X,Y,u,v,linewidth=1.5,arrowsize=1)
plt.show()
```

]]>This is what I have so far:

```
def main ():
name = input("What is the whole name? ").lower() #get name, make all lowercase
alph = [" abcdefghijklmnopqrstuvwxyz"] #list of characters
total = 0 #apply value for each character in name
for ch in name:
total = ord(ch) + total - 96
print("The numerical value of the name is \n", total) #print the result
main()
```

For some reason my program works with some of the names I input (such as dani = 28), but other names (notably longer ones) are not returning correct answers. What am I doing wrong?

Here is the whole homework problem for reference:

Numerologists claim to be able to determine a person's character traits based on the "numeric value" of a name. The value of a name is determined by summing up the values of the letters of the name where 'a' is 1, 'b' is 2, 'c' 3 etc., up to 'z' being 26. For example, the name "Zelle" would have the value 26+5+12+12+5=60. Write a program that calculates the numeric value of a single name provided as input.

Expand your solution to the previous problem to allow the calculation of a complete name such as "Jackson Thomas Mills." The total value is just the sum of the numeric values of all the names.

]]>I am confused please explain what to use and when? ]]>