is not recognized as an internal or external command, operable program or batch file
Oct 3, 2013 at 5:40pm UTC
I just got a new computer running windows 8, and I am using Microsoft Visual C++ 2010 Express. I am trying to finish a homework problem, so that I can fix any errors in it. I'm not sure if my coding is causing the error when I debug, so I have included it as well. It is not complete yet, I still need to look it over and fix any mistakes
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
//Shipping Widgets
//David Karayof
//Oct. 21, 2008
#include<iostream>
using namespace std;
int main()
{
//Declare Variables
char Widgets;
double totwidg = 0.0, totfoam = 0.0, Ssmall = 0.0, Smed= 0.0, Slg = 0.0;
const double Small = 4.0, Medium = 6.0, Large = 10.0;
//Title
cout << "Shipping Widgets\n\n" ;
cout << "We can ship up to 10 widgets in boxes of three sizes:\n" ;
cout << "A small box holds" << Small << "widgets\n" ;
cout << "A medium box holds" << Medium << "widgets\n" ;
cout << "A large box holds" << Large << "widgets\n" ;
cout << "Unused space in the box is filled with foam blocks which\n are" ;
cout << "the same size as a widget\n" ;
//Input data
cout << "\n\nInput the number of widgets to ship: " ;
cin >> Widgets;
while (Widgets = !0)
{
if (1.0 <= Widgets <= 4.0)
{
cout << "A small box was used to ship" << Widgets << "units" ;
foam = 4.0 - Widgets;
totfoam += foam;
Ssmall = Ssmall + 1;
totwidg += Widgets;
}
if (5.0 <= Widgets <= 6.0)
{
cout << "A medium box was used to ship" << Widgets << "units" ;
foam = 6.0 - Widgets;
totfoam += foam;
Smed = Smed + 1;
totwidg += Widgets;
if (7.0 <= Widgets <= 10.0)
{
cout << "A large box was used to ship" << Widgets << "units" ;
foam = 10.0 - Widgets;
totfoam += foam;
Slg = Slg + 1;
totwidg += Widgets;
}
}
//Output current status
cout << "\nA total of " << totwidg << " widgets were shipped," ;
cout << " using " << Ssmall << " small boxes, " << Smed<< " medium" ;
cout << " boxes, " << Slg << "large boxes, and " <<totfoam << "foam" ;
cout << "packing blocks." ;
return 0;
}
Oct 3, 2013 at 9:18pm UTC
The error message in the title of your topic is not related to your program.
Oct 4, 2013 at 4:10pm UTC
ok, i looked online for what do but it was very confusing. does anyone know how i can fix this?
Topic archived. No new replies allowed.