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?

Code:
#include <iostream>
#include <iomanip>
using namespace std;
void calcMonCost (double, double, double, double, double, double &);
void calcAnnCost (double, double, double, double, double, double &);
void getData(double &lnPymnt, double &insure, double &gas, double &oil, double &tires, double &maint);

[Code] .....

View 1 Replies


ADVERTISEMENT

C# :: User Monthly Expenses Integer Array?

Nov 19, 2014

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.");

[code]....

View 6 Replies View Related

C/C++ :: Calculate Total Cost Given The Tax Values - Getting C2784 Error

Sep 3, 2014

// Purpose: calculate total cost given the tax values

#include <iostream>
#incluse <string>
using namespace std;
int main() {
double purchasePrice, stateTaxAmt, countyTaxAmt, totalCost;
//Display purchase price

[Code] ....

View 2 Replies View Related

C++ :: Word Counter - Calculate Number Of Letters And Give Total Cost

Nov 4, 2013

I am currently working on an assignment.

#include <iostream>
using namespace std;

int main(int argc, char *argv[]) {
char letter;
int count = 0;
double ppl = 0;
double finalCost = ppl * (count - 1);

[Code] ....

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.

View 2 Replies View Related

C :: Create A Program That Will Calculate A Shipping Cost?

Feb 16, 2015

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>

[Code]......

View 1 Replies View Related

C/C++ :: Calculate Cost From Wholesale To Final With Percentage Markup

Apr 15, 2014

Program calculates cost from wholesale to final cost with percentage markup!

#include <iostream>
using namespace std;
int calculate_retial(int,int);
int main () {
int wholesale;
int markup;
int cost;

[Code] ....

View 5 Replies View Related

C :: Calculate Cost For Production Of Open Top Cylinders - User Defined Functions

Feb 20, 2013

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:

[Code] ......

View 2 Replies View Related

Visual C++ :: Display A Monthly Calendar?

Dec 5, 2012

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:

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

After the last day of the calendar is displayed, the function should advance the cursor to the next line.

Note that for the display above, the start day is 3 and the numbers of days is 31.

View 1 Replies View Related

C++ :: Calculate Total No Of Comparison Using Selection Sort?

Sep 15, 2014

how to put comparision condition in order to caculate total number of comparision in selection sort

static void selectsort(int[] data, int n)
{
int i, j;
for (i = 0; i < n; i++)

[Code]....

View 1 Replies View Related

C++ :: While Statement - Calculate Total For Three Stores Payrolls

Mar 26, 2013

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;

[Code] .....

View 6 Replies View Related

C Sharp :: Calculate The Total Of Pages For All File?

Oct 21, 2012

How can I calculate the total of pages for all file(pdf,word,excel,txt...) types in a directory with c#?

View 2 Replies View Related

C Sharp :: Calculate The Total And Compare All Row In Datagridview?

Dec 3, 2012

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) {

[code]....

View 5 Replies View Related

C++ :: How To Calculate Total Surface Covered - Overlapping Squares

May 24, 2013

How would i calculate a surface that up to 10^5 squares cover. The info you get is xpos,ypos and width for each square.

How would you calculate the total surface covered (if any overlap only one counts).

Cannot use a big array of bools as the memory limit is 512 MiB.

View 2 Replies View Related

C :: How To Calculate Total Sum Of Delay Of Receiving Side Packet

Dec 17, 2014

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();

[Code]...

View 2 Replies View Related

C++ :: Repeat A Question Over And Over And Calculate Total When User Wants To Quit

Feb 27, 2014

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.

View 1 Replies View Related

C++ :: Program To Calculate Total Grade For N Classroom Exercises As Percentage

Mar 5, 2013

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";

[Code] .....

Error:
1>------ Build started: Project: HOMEWORK5, Configuration: Debug Win32 ------
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>C:UsersWORKHOMEWORK5DebugHOMEWO… : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

View 4 Replies View Related

C++ :: Calculate Fewest Number Of Each Denomination Needed To Pay A Bill Of Amount Total

Mar 5, 2013

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 %.

View 1 Replies View Related

C++ :: Tourist Agency - Calculate Total Price For Customers For A Package Of Vacation?

Apr 25, 2013

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;

[Code] .....

View 8 Replies View Related

C# :: Custom Media Player Time Bar - Calculate Total Size And Proportion

Dec 30, 2014

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...

Attached image(s)

View 14 Replies View Related

C++ :: Avoiding Reallocation Costs When Inputs Are Unbounded

Jul 9, 2013

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).

View 2 Replies View Related

C# :: How To Display Monthly Attendance Report

Jun 9, 2014

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

View 11 Replies View Related

C :: Array Add Total Rows And Total Columns

Apr 16, 2013

Code: i am trying to display the information in the array as a table and add the total rows and the total colums separately

#include<stdio.h>
int main(void)
{
int row, col;

[Code].....

View 1 Replies View Related

Visual C++ :: DialogBox Show Nothing?

Sep 17, 2012

I've got this slice code inside a DLL:

Code:
DWORD processId;
HWND hwndParent;
BOOL CALLBACK enumWindowsProc(HWND hwnd, LPARAM lParam)
{

[Code]...

Why id doesn't show any Dialog?

View 3 Replies View Related

Visual C++ :: How To Show File Menu

Mar 14, 2013

I have an MDI application using different menus depending on the current document template in use.

I need to show the top-level File Menu from the IDR_MAINFRAME window when a command is sent from the active document.

I would like to application to deactivate the active child window and then show the File menu as if the alt-F key was pressed from the keyboard.

I have tried CMenu *pMenu=AfxGetMainWnd()->GetMenu();

but this does not display the menu at all.

View 2 Replies View Related

Visual C++ :: Show A Tooltip For ClistCtrl?

Feb 7, 2014

I have problems to show a tooltip for a ClistCtrl.

I searched for some solutions in the web.

I found only solution where derived classes are used.

Is it no possible to use tooltips in ClistCtrl without a derivate ClistCtrl?

View 11 Replies View Related

Visual C++ :: Show Memory Leaks In Dll?

Dec 20, 2012

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?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved