Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #11 (permalink)  
Old October 31st, 2005, 10:45 PM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

visual c++ is mistake for c++
the right adress is http://www.wrox.com/WileyCDA/WroxTit...load_code.html
I have download it form here ,it's ture
Try!!!


Reply With Quote
  #12 (permalink)  
Old October 31st, 2005, 10:51 PM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

   I'am a college student form China
My English is not very good,if there is any wrong please tell me
I like making friends ,my adress is [email protected]

Reply With Quote
  #13 (permalink)  
Old March 23rd, 2006, 02:45 PM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is my questions:
Write an interactive program for a grocery store which will ask for the transaction year, user's name entering the data and will request from the user total monthly sales for each month through the year. The output will be the total sales per quarter, average quarterly sales, total annual sales and average annual sales.

What am I doing wrong

#include <iostream.h>


int main ( )
{

    int transYear, userName, num;
    double month1,month2,month3,month4,month5,month6,month7,m onth8,month9,month10,month11,month12;
    double qrt1, qrt2, qrt3, qrt4, qrtAvg, annlSales, annlAvg;

    qrtAvg = (qrt1+qrt2+qrt3+qrt4)/4;
    annlSales = (month1+month2+month3+month4+month5+month6+month7+ month8+month9+month10+month11+month12);
    annlAvg = (month1+month2+month3+month4+month5+month6+month7+ month8+month9+month10+month11+month12)/12;

    cout << "Enter transaction year: \n" ;
    cin >> transYear;
    cout << "Enter user name: \n";
    cin >> userName;

    cout << "Enter montly sales separated by space: ";
    cout << endl;
    cin >> month1>> month2>> month3>> month4>> month5>> month6>> month7>> month8>> month9>> month10>> month11>> month12;

    cout << "Sales per quarter are: \n" << qrt1 << "\n"<< qrt2 <<"\n"<< qrt3 <<"\n"<< qrt4;
    cout << endl;
    cout << "Average quarterly sales are: \n" << qrtAvg;
    cout << endl;
    cout << "Total annual sales are: \n" << annlSales;


return 0;

}

Reply With Quote
  #14 (permalink)  
Old April 7th, 2006, 07:21 AM
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

eminson how many times are you going to post the same question. check one of your other posts
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Why I can not find the code asp600 XML 2 January 13th, 2005 10:29 AM
where to find the code huangyong Wrox Book Feedback 1 November 16th, 2004 10:33 AM
I Cannot find code! anonan All Other Wrox Books 6 March 22nd, 2004 06:27 AM
Why I can't find the code? snowflake310 VS.NET 2002/2003 3 January 21st, 2004 11:28 AM
Still can't find that code lizardnotebk BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 January 7th, 2004 08:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.