C++ Programming- CIS 1111
The CPlusPlus & LandMinusMinus Company needs you to write a program which will produce a report, in both number and chart form, which will display Net Sales for their three company divisions, for any given month of the year entered by the user.
The corporate tax rate for the company is 30% (define as constant); the three division names are East-Coast, Mid-West, and West-Coast.
Requirements
Use this test data when creating the screen-print part of your assignment submission:
March (division: sales, expense)
East Coast: $15,000, $1,500
Mid West: $20,000, $1,000
West Coast: $18,500, $2,000
August (division: sales, expense)
East Coast: $25,000, $5,500
Mid West: $17,000, $1,000
West Coast: $14,500, $3,000
#include<iostream>
#include<string>
using namespace std;
int main(){
int m = 3,i, j=0, ind;
string month[50], divisions[3];
double sales, expenses, netSales[3], max = 0, avg[50];
while(1){
cout<<"Enter month (-1 to exit): ";
cin>>month[j];
if(month[j]=="-1")
break;
for(i=0; i<3; i++){
cout<<"\nEnter Division: ";
getline(cin, divisions[i]);
getline(cin, divisions[i]);
while(1){
cout<<"Sales: ";
cin>>sales;
if(sales>=0)
break;
cout<<"sales must be zero or greater";
}
while(1){
cout<<"Expenses: ";
cin>>expenses;
if(expenses>=0)
break;
cout<<"Expenses must be zero or greater";
}
avg[j] += sales;
netSales[i] = (sales-expenses)-((sales-expenses)*0.3);
}
cout<<endl;
double monthNetSales = 0;
for(i=0; i<3; i++){
cout<<divisions[i]<<": $"<<netSales[i]<<" ";
monthNetSales += netSales[i];
if(netSales[i]<1000){
cout<<"-";
}
else{
double net = netSales[i];
while(net>1000){
cout<<"*";
net -=1000;
}
}
cout<<endl;
}
if(max<monthNetSales){
max = monthNetSales;
ind = j;
}
j++;
cout<<endl;
}
for(i=0; i<j; i++){
cout<<month[i]<<", Avg Sales: $"<<(avg[i]/3.0)<<endl;
}
cout<<"Highest Sales Month: "<<month[ind]<<", Net sales: "<<max<<endl;
}
C++ Programming- CIS 1111 The CPlusPlus & LandMinusMinus Company needs you to write a program which...
C++ and Using Microsoft Visual Studio. Write 2 programs: One program will use a structure to store the following data on a company division: Division Name (East, West, North, and South) Quarter (1, 2, 3, or 4) Quarterly Sales The user should be asked for the four quarters' sales figures for the East, West, North, and South divisions. The data for each quarter for each division should be written to a file. The second program will read the data written...
Description:In this assignment, you will write a program in C++ that uses files and nested loops to create a file for real estate agents home sales and then read the sales from the file and calculates the average sale for each agent. Each agent sold 4 homes. Use a nested loop to write each agent’s sales to a file. Then read the data from the file in order to display the agent’s average sale and the average for all sales....
Help. Write a C++ program that determines which of a company's four divisions (North, South, East, West) has the greatest sales for the quarter. It should include three functions at a minimum: float getSales() is passed the name of a division. It asks the user for a division's quarterly sales figure, calls a validate() function that will validate the input, and then returns the value back to main(). This function should be called once for each division. void validate() is...
CProgramming using Dev C ++ #include <stdio.h> PLEASE NO math.h Corporate Sales Data Report Write a program that read creates a structure for a company's divisions. The structure should have: Division name (North, South, East, West, and Central) Quarter (1, 2, 3, or 4) Quarterly sales · Your job is to write a program that will create a two-dimensional array of 5 rows (divisions) and 4 columns (quarters). The program should ask the user to enter in all four quarters...
Write a program that determines which of a company's eight divisions (North, South, East, West, Northeast, Southeast, Northwest, Southwest) had the greatest sales for a quarter. It should include the following two functions which are called only by main. double getSales() - it is passed the name of a division. It asks the user for a division's quarterly sales figure, validates the input then returns it. It should be called once for each division. Negative dollar amounts are invalid. void...
guys need help please im super lost anyone save me do programming exercise top_div_array.cpp: Winning Division app (top_div.cpp) revisited to use arrays This is the same program done last week but using and passing arrays instead of individual variables. Start with the following file / cODE BELOW: // Name: top_div_array.cpp // Description: // This app inputs sales for four regional division and displays the highest. // To accomplish this, use two arrays of equal length - one for sales and...
C++ 18. Savings Account Balance Write a program that calculates the balance of a savings account at the end of a three month period. It should ask the user for the starting balance and the annual interest rate. A loop should then iterate once for every month in the period, performing the following A) Ask the user for the total amount deposited into the account during that month. Do not accept negative numbers. This amount should be added to the...
how to make this program for c++ visual studio 2015. Also, can I show your working and program. Also, Can you have notice for pseudo code? For the first problem, please implement Problem 4 on page 142 (p 143, 7E) of the text. A scan of the problem is provided below. This problem asks you to calculate the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or...
i need this to be in OOP using C++ 25. Savings Account Balance Write a program that calculates the balance of a savings account at the end of a three-month feried. It should ask the user for the starting balance and the annual interest rate. A loop abculd then iterate once for every month in the period, performing the following steps: B) A) Ask the user for the total amount deposited into the account during that month and add it...
The XYZ Company needs you to write a program that will allow them to enter the weekly sales for a salesperson and then the program will calculate things such as most sales (and what day on which they happened), least sales (and day on which they happened), total sales, and daily average. The program will need to do the following: • Validate the user input to ensure that it is not less than 0.0 (0.0 will be acceptable if there...