Short Summary:
Source Code:
using System;
using System.Globalization;
class HomeSales {
static void Main() {
string initial = "";
int dSale = 0;
int eSale = 0;
int fSale = 0;
int total = 0;
// iterates till the user entered initial is z
while (initial != "z")
{
// get user input
Console.WriteLine("Enter a salesperson initial:");
initial = Console.ReadLine().ToLower();
//check for the initial
if(initial == "d" || initial == "e" || initial == "f"){
// get sale amount from user
Console.WriteLine("Enter amount of sale:");
// converting the inlut to int
int amount = Convert.ToInt32(Console.ReadLine());
// based on the initial adding it to repecitive variable
if (initial == "d")
dSale += amount;
else if (initial == "e")
eSale += amount;
else if (initial == "f")
fSale += amount;
}else{
// error message for wron initial
if(initial != "z"){
Console.WriteLine("Sorry - invalid salesperson");
}
}
}
// calculationg total amount
total = dSale + eSale + fSale;
// displaying the result using currency symbol
Console.WriteLine("Danielle sold: {0}", dSale.ToString("C",
CultureInfo.GetCultureInfo("en-US")));
Console.WriteLine("Edward sold: {0}", eSale.ToString("C",
CultureInfo.GetCultureInfo("en-US")));
Console.WriteLine("Francis sold: {0}", fSale.ToString("C",
CultureInfo.GetCultureInfo("en-US")));
Console.WriteLine("Total sales were: {0}", total.ToString("C",
CultureInfo.GetCultureInfo("en-US")));
// finding the most sold
if(dSale > eSale && dSale > fSale){
Console.WriteLine("Danielle sold the most");
}else if(eSale > dSale && eSale > fSale){
Console.WriteLine("Edward sold the most");
}else if(fSale > dSale && fSale > eSale){
Console.WriteLine("Francis sold the most");
}else {
Console.WriteLine("There was a tie");
}
}
}
Refer the following screenshots for code indentation:


Sample Run:

**************************************************************************************
Feel free to rate the answer and comment your questions, if you have any.
Please upvote the answer and appreciate our time.
Happy Studying!!!
**************************************************************************************
c# Instructions In Chapter 5, you wrote a HomeSales application for three salespeople: Danielle, Edward, and...
In Chapter 5, you wrote a HomeSales application for three salespeople: Danielle, Edward, and Francis. Now, using the code you wrote in Chapter 5, Programming Exercise 5, modify the program to use arrays to store the salesperson names, allowed initials, and accumulated sales values. In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format...
In Chapter 5, you wrote a HomeSales application for three salespeople: Danielle, Edward, and Francis. Now, using the code you wrote in Chapter 5, Programming Exercise 5, modify the program to use arrays to store the salesperson names, allowed initials, and accumulated sales values. In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format...
Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user for a salesperson initial (D, E, or F). Either uppercase or lowercase initials are valid. While the user does not type Z, continue by prompting for the amount of a sale. Issue an error message for any invalid initials entered. Keep a running total of the amounts sold by each salesperson. After the user types Z or zfor an initial, display...
Use Microsoft Visual Studio C# only, don't need a GUI. Use Console interface Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user for a salesperson initial (D, E, or F). Either uppercase or lowercase initials are valid. While the user does not type Z, continue by prompting for the amount of a sale. Issue an error message for any invalid initials entered. Keep a running total of the amounts sold...
Need help with this programming please this is the instruction
my teacher provided
Write a C++ class called "Sales" and a main( ) function that uses the class. Also, write documentation of your project. Below is a specification of the class. . INTRODUCTION A company has four salespeople (1 to 4) who sell five different products ( to 5)1. Once a day each salesperson passes in a slip for each different type of product sold. Each slip contains: The salesperson...
Sales Data Analysis
A company has multiple salespeople. Every month, they go on road
trips to sell the company's product. At the end of each month, the
total sales for each sales person, together with that salesperson's
ID and the month, is recorded in a file. At the end of each year,
the manager of the company wants to see an Annual Sales Report in
the format illustrated in the sample execution below. Your report
should look substantially similar to...
1. You are given a C file which contains a partially completed
program. Follow the instructions contained in comments and complete
the required functions. You will be rewriting four functions from
HW03 (initializeStrings, printStrings, encryptStrings,
decryptStrings) using only pointer operations instead of using
array operations. In addition to this, you will be writing two new
functions (printReversedString, isValidPassword). You should not be
using any array operations in any of functions for this assignment.
You may use only the strlen() function...
Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such as declaration, initialization, storing, retrieving, and processing elements. • Effectively manipulating and using ArrayList objects. • Becoming familiar with the use of arrays as method arguments and how array elements are passed to and returned from the called method. • Mastering the use of various debugging tools available on the Eclipse IDU. Important: EVERY one of the following Activities MUST be in a separate...
For Java Program In this lab you will gain experience using all the concepts we learned to this point, which include classes, methods, collections, and file input/output. Also, you will gain experience in team programming. This assignment will be completed by teams of 2. Each member must complete an equal amount of the work in order to receive credit for this assignment. You must write the programmer’s name in a comment for each method you write. You need to create...