Homework help

closed account (37S1hbRD)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// DogDayCare.cpp : Defines the entry point for the console application.
// Eric Vardinakis
// 9'24'2012

#include "stdafx.h"
#include<iostream>
using namespace std;



int _tmain(int argc, _TCHAR* argv[])
{

	int mediumdog;
	int LageDog = 35;
	int smalldog = 10;
	int shortstay;
	int longstay = 11;
	cout << "How much does your dog way ";
	cin >> mediumdog;
	if (mediumdog  < smalldog)
		cout << "You have a small dog."<< endl;
	else
		if (mediumdog > LageDog)
			cout << "You have a big dog." << endl;
		else
			cout <<"You have a medium size dog."<< endl;
	{
		cout << "How long wil you dog be staying here. " << endl;
		cin >> shortstay;
		if (shortstay < longstay)
			cout << "Thats a short stay."<< endl;
		else
			cout << "Thats a long stay."<< endl;
	}

		


	

	
	system("pause.exe");
	return 0;
}



I am new to C++ and programming. the code i wrote works but my college professor wants me to make dogs that are under 10ld cost $12 dogs that are between 10-35lb cost $16 and dogs that are over 35lb cost $19. if they stay1-10 days. If they stay 11 or more days she wants it to say under10lb cost $10 10-35lb cost $13 and over 35lb cost $17
This is the link to my book if you don't get what i am saying its page 119 Exercises 12 DogDayCare.cpp
http://books.google.com/books?id=akzWMS9_PYoC&printsec=frontcover#v=onepage&q&f=false
please i need some one to help me this is do Tuesday at 11pm est
What exactly do you need help on? try to pinpoint your exact issue so we can help.
closed account (37S1hbRD)
i dont know how to add the cost to it
closed account (37S1hbRD)
[code/ DogDayCare.cpp : Defines the entry point for the console application.
// 9'24'2012
// Chapter 3
// Lab 2


#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;



int _tmain(int argc, _TCHAR* argv[])
{

int mediumdog;
int LageDog = 35;
int smalldog = 10;
int shortstay;
int longstay = 11;
int numberOfDays = 0;
int pricePerDay = 0;
int totalPrice = 0;

cout << "How much does your dog way ";
cin >> mediumdog;
if (mediumdog < smalldog)
cout << "You have a small dog."<< endl;
else
if (mediumdog > LageDog)
cout << "You have a lage dog." << endl;
else
cout <<"You have a medium dog."<< endl;
{
cout << "How long wil you dog be staying here. " << endl;
cin >> shortstay;
if (shortstay < longstay)
cout << "Thats a short stay."<< endl;
else
cout << "Thats a long stay."<< endl;
}

if(mediumdog < 10)
{
if(shortstay < 11)
{
pricePerDay = 12;
}
else
{
pricePerDay = 10;
}
}
else if(mediumdog > 35)
{
if(shortstay < 11)
{
pricePerDay = 19;
}
else
{
pricePerDay = 17;
}
}
else
{
if(shortstay < 11)
{
pricePerDay = 16;
}
else
{
pricePerDay = 13;
}
}
totalPrice = pricePerDay * shortstay;

cout << "Your total cost is $" << totalPrice << endl;
system("pause.exe");
return 0;
}][/code]

Never mined i figer it out
Topic archived. No new replies allowed.