Click here to Skip to main content
15,907,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSDK vs MFC ownerdraw Pin
alex.barylski25-Oct-02 12:33
alex.barylski25-Oct-02 12:33 
GeneralRe: SDK vs MFC ownerdraw Pin
Ravi Bhavnani25-Oct-02 12:46
professionalRavi Bhavnani25-Oct-02 12:46 
GeneralRe: SDK vs MFC ownerdraw Pin
alex.barylski25-Oct-02 13:08
alex.barylski25-Oct-02 13:08 
GeneralRe: SDK vs MFC ownerdraw Pin
Ravi Bhavnani26-Oct-02 4:55
professionalRavi Bhavnani26-Oct-02 4:55 
GeneralNeed Help(CDC) Pin
Svin25-Oct-02 10:49
Svin25-Oct-02 10:49 
GeneralRe: Need Help(CDC) Pin
includeh1025-Oct-02 21:15
includeh1025-Oct-02 21:15 
GeneralBig thx Pin
Anonymous26-Oct-02 6:21
Anonymous26-Oct-02 6:21 
QuestionHow to write a code to increment by 4 Pin
needhelp5725-Oct-02 10:43
needhelp5725-Oct-02 10:43 
I am writing a program that provides the cost depending on weight. If the item weighs less than 16 ounces, the cost is $3.00. If more than 16 ounces the cost increases by .50 for each additinal 4 ounces. Here is what I have so far. It give me the 3 (not showing current format of $3.00) for weights <=16. But >16 shows a negative number.

Can some edit my code so it'll work? URGENT

#include <iostream.h>
#include <stdlib.h>
#include<stdio.h>

int main()
{
int wgt;
int x=0;
double cost;
int n = 4;
double i = 0.50;
double y;

cout <<"Enter the weight" <<endl;
cin="">> wgt;

if (wgt <16)
cost = 3.00;

cout <<"The cost is" <<cost <<endl;
="" {
="" if
="" (wgt="">16)
wgt = wgt +x;
x= n++;
y= i++;
cost = cost +y;


cout <<"Do you want to calculate the delivery";
cout <<" cost for another package?" <
AnswerRe: How to write a code to increment by 4 Pin
Chris Losinger25-Oct-02 10:58
professionalChris Losinger25-Oct-02 10:58 
GeneralRe: How to write a code to increment by 4 Pin
needhelp5728-Oct-02 7:29
needhelp5728-Oct-02 7:29 
AnswerRe: How to write a code to increment by 4 Pin
Mel Feik25-Oct-02 11:09
Mel Feik25-Oct-02 11:09 
GeneralAuto-completion after . or -> doesn't work Pin
User 665825-Oct-02 10:34
User 665825-Oct-02 10:34 
GeneralRe: Auto-completion after . or -> doesn't work Pin
Chris Losinger25-Oct-02 10:56
professionalChris Losinger25-Oct-02 10:56 
GeneralRe: Auto-completion after . or -> doesn't work Pin
User 665825-Oct-02 11:24
User 665825-Oct-02 11:24 
GeneralInserting your own warnings into code Pin
nde_plume25-Oct-02 9:35
nde_plume25-Oct-02 9:35 
GeneralRe: Inserting your own warnings into code Pin
Michael Dunn25-Oct-02 14:57
sitebuilderMichael Dunn25-Oct-02 14:57 
GeneralRe: Inserting your own warnings into code Pin
nde_plume5-Nov-02 8:24
nde_plume5-Nov-02 8:24 
GeneralRe: Inserting your own warnings into code Pin
Anonymous25-Oct-02 19:23
Anonymous25-Oct-02 19:23 
GeneralCreating a maximixed dialog Pin
monrobot1325-Oct-02 9:24
monrobot1325-Oct-02 9:24 
GeneralRe: Creating a maximixed dialog Pin
Ravi Bhavnani25-Oct-02 9:53
professionalRavi Bhavnani25-Oct-02 9:53 
GeneralRe: Creating a maximixed dialog Pin
monrobot1325-Oct-02 12:52
monrobot1325-Oct-02 12:52 
GeneralRe: Creating a maximixed dialog Pin
includeh1025-Oct-02 21:47
includeh1025-Oct-02 21:47 
GeneralRe: Creating a maximixed dialog Pin
Didaa25-Oct-02 21:32
Didaa25-Oct-02 21:32 
GeneralRe: Creating a maximixed dialog Pin
Gary R. Wheeler26-Oct-02 3:34
Gary R. Wheeler26-Oct-02 3:34 
GeneralResize Dialog Box via Code :: MFC Pin
valikac25-Oct-02 9:21
valikac25-Oct-02 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.