Visual C++ :: Calculate Total Of Monthly Costs Of Expenses And Show Annual Cost
Oct 5, 2012
The point of this is to calculate the total of the monthly costs of these 6 expenses and then to show the annual cost. However, there's just a couple of things that's giving me problems and it's the calcMonCost in my code. The error says that it is more than one instance of overload function and also that an unresolved external symbol. Everything else is fine. What does this mean?
Basically, I need to "write a program to simulate tracking monthly expenses" using an integer array into which the user can enter an expense. After that, it needs to loop back and ask them if they want to display their expenses or add another, which is the main thing I'm not sure how to make happen.
namespace Assignment2 { class Program { static void Main(string[] args) { // display welcome message and ask if user wants to update or display monthly expenses Console.WriteLine("Hello, this is a program to track your monthly expenses.");
I am trying to create a word counter program that asks for the price per letter and then asks for the sentence they are writing. The app should then calculate the number of letters and give the total cost similar to:
You have 40 letters at $3.45 per letter, and your total is $138.00.
Everything compiles fine but when I run it the inputs don't work and it outputs:
You have -1 per letter, and your total cost is $-0.
So im trying to create a program that will calculate a shipping cost. I'm stuck on trying to calculate the actual milage and cost. Example being 1400 miles for a 2lb package would be $2 for every 500miles. so it would cost $6. But Im having trouble getting the program to round up the 1400 to 1500 so it charges the correct amount.
I know there would have to be a way to do this without programming all the conditions.
Also the course has not reached loops yet.
Code:
// This program will calculate the shipping charges.// The shipping rates are based on per 500 miles shipped. // They are not pro-rated, i.e., 600 miles is the same rate as 900 miles or 1000 miles. #include <stdio.h> #include <stdlib.h>
I have this program I wrote to calculate cost for the production of open top cylinders and how to translate it into user defined functions. Here are the user defined functions I need to use instruct() get_area() comp_area() and print_area_cost() so the program will be in 4 parts.
Code: #include <stdio.h> int main() {double radius,height,cost,single,all; float surface_area; int count; double pi=3.14159265; printf("Enter the radius of the base in cm^2:
I need to write a function that displays the days of a specified month. I have been looking for sample code but haven't had much luck. Here are the guidelines for the function:
Write a void function named displayCalendarDays. This function is passed two input parameters. The first parameter is an int that represents the start day. Start days are numbered from 0 to 6 with 0 representing Sunday and 6 representing Saturday. The second parameter is an int that represents the number of days in the month. If the start day is not in the range 0 to 6 or if the number of days is not in the range 1 to 31, the program should display useful error message instead of displaying a calendar. If the parameters are OK, the program should display a calendar similar to the following:
I have a program that needs to calculate the total for three stores payrolls.
Inputs would be the three stores payrolls Output would be the total of all three
I HAVE to use the while statement.
I have also read the articles on the while statement on here and on other sites. I'm having trouble because every site I've seen so far has only been giving examples of numbers(like counting down or repeating a statement so many times).
Code:
#include <iostream> #include <cmath> using namespace std; int main() { //declare variables int storePayroll = 0; int totalPayroll = 0; int storeNum = 0;
I have a window form with datagridview,textbox,button and listbox. In datagridview i have added a column. In first row i have given the value like 7000,
second row 2500, third row 7000, fourth row 1000, fifth 1300, sixth 9000....n number of row:
if i enter 12000 in textbox1 then it will calculate the total in particular rows in datagridview.And the total should be less than 12000 what we have entered the value in textbox1.
The result will display in listbox..
like first greater value is 9000+2500=11500 , second greater value 7000+1000+1300=9500, other third greater value is 7,000.
So i have given a sample code where i cannot get the solution ..
double search; search = double.Parse(textBox1.Text); double sum = 0; for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { double se2 = Convert.ToDouble(dataGridView1.Rows[i].Cells[0].Value.ToString()); if (se2 == search) {
I want to calculate the total some of delay pf receiving Side Packet . Code is as Follow ..
What is weird that even if i invoke a sleep of 2 sec ,than its show delay always zero. Delay will be in microsec ..Is there any problem with logic or anything else..
Code:
do {#pragma omp parallel private(nthreads, tid) { /* Obtain thread number */ tid = omp_get_thread_num(); if (tid == 0) { nthreads = omp_get_num_threads();
Write a program which is used to calculate GPA based on the grades from different courses Input by the user. User should be able to enter as many course unless they choose to quit. Once the user has completed entering the data, the program should be able to provide a feedback on the GPA. Where A=4, B=3, C=2, D=1.
Write a program that calculates the total grade for N classroom exercises as a percentage. The user to input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the total points earned divided by the total point possible) and output it as a percentage. Sample input and output it as a percentage. Sample input and output is shown below.
How many exercises to input? score1: 10 total points possible: 10 score2: 7 total points possible: 12 score3: 5 total points possible: 8
Code: # include <iostream> using namespace std; int main () { double N=0, score, total, totalScore=0, totalGrade=0, GRADE; cout<<"How many excersices will be scored?/n";
Write a C++ program to calculate the fewest number of each denomination needed to pay a bill of amount TOTAL. For example, if the end user enters $97 for TOTAL, program will output that the bills would consist of one $50 bill, two $20 bills, one $5 bill, and two $1 bills. (Assume that the amount is in whole dollars, no cents, and only $100, $50, $20, $10, $5, and $1 denominations are available.) Aid: You may want to use the modulus operator %.
SYNOPSIS : KBJ tourist agency Sdn. Bhd wants you to write an application program to calculate the total price for their customers for a package of vacation. The following table shows the price for three destinations (transportation and accommodation) offered by the agency:
Destination TransportationAccommodation Pulau Redang Child RM15.00 Adult RM30.00RM95 per day Pulau Perhentian Child RM20.00 Adult RM30.00 RM100 per day Pulau Kapas Child RM10.00 Adult RM20.00 RM120 per day
This agency company will give some discount to a group of customers with is:
a.10% discount will be given for the group that has a least 5 adults.
b.25% discount will be given for the group that has more than 5 persons (adults and children)
c.30% discount will be given for the group that has at least 15 persons.
Your application program has to display the output using this following screen layout:
KBJ TOURIST CUSTOMER INFORMATION
Customer’s name: XXXXXXXXXXXXX Number of Children:XXXXX Number of Adult: XXXXX Transportation: RMXXX.XX Accommodation: RMXXX.XX Total price: RMXXXX.XX
This is the code i got so far but it doesn't work..:(
#include <iostream.h> int main () { char customerName,code,A,B,C; int childNum,adultNum; double rate,discount,totalPrice,a,c;
Im just wondering how would i get a formula to calculate the total size and proportion of how far the media player has been played, in proportion with the size of the sizeable form, i need an int for the:
Width of formLength of movieHow long has been played by user
I have this code so far:
//The current position played! - Within the timer.tick event arg! string splayed = axWindowsMediaPlayer1.Ctlcontrols.currentPosition.ToString().Split('.')[0]; int iplayed = Convert.ToInt32(splayed + 1); //The total time of the movie/audio. string stotal = axWindowsMediaPlayer1.Ctlcontrols.currentItem.duration.ToString().Split('.')[0]; int itotal = Convert.ToInt32(splayed);
[Code] ....
I have the "AxWindowsMediaPlayer" reference installed, but i need to know how it would work...
how to handle reallocation costs when input data is unbounded.
For instance, in a low-latency environment such as a trading platform or real-time data collection system or MMORPG where you can receive a large amount of input, you can not afford a stall while the data structure is rebuilt with a larger buffer. You can use historical data to "guess" an appropriate size but this is far from fool-proof. You can also create a sentinel thread that monitors the load factor of your data structure but that brings its own problems (e.g. another thread that needs execution time and to lock the data).
I have a table in sql called empattendancetable the fields are
eid empname designation logindatetime status emp001 abc manager 30-05-201412;00PM present
likewise i want to display the month wise attendance details of all the employees
the logindatetime field value from datetimepicker i am not getting how to write the query to get the month wise detailsusing c# i am creating a windows application to maintain the details of employees
when ending my app in the debugger, memory leaks will be shown like this:
Detected memory leaks!
Dumping objects -> C:PROGRAM FILESVISUAL STUDIOMyProjectsleaktestleaktest.cpp(20) : {18} normal block at 0x00780E80, 64 bytes long. Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD Object dump complete.
How can I tell Visual c++ also to show me the memory leaks in a called dll?