Nov 16, 2016 at 2:27am UTC
#include <iostream.h>
#include <string.h>
int main()
{
char partno[15];
int length;
cout << "\nEnter the part number: ";
cin >> partno;
length = strlen(partno);
if(length == 4 || length == 5)
{
if((partno[1] == 'M' || partno[1] == 'm') && (partno[2] == 'S' || partno[2] == 's'))
cout << "\nDelivery Method is : Mail - Standard. ";
else if((partno[1] == 'M' || partno[1] == 'm') && (partno[2] == 'P' || partno[2] == 'p'))
cout << "\nDelivery Method is : Mail - Priority. ";
else if((partno[1] == 'F' || partno[1] == 'f') && (partno[2] == 'S' || partno[2] == 's'))
cout << "\nDelivery Method is : FedEx- Standard. ";
else if((partno[1] == 'F' || partno[1] == 'f') && (partno[2] == 'O' || partno[2] == 'o'))
cout << "\nDelivery Method is : FedEx - Overnight. ";
else if((partno[1] == 'U' || partno[1] == 'u') && (partno[2] == 'P' || partno[2] == 'p'))
cout << "\nDelivery Method is : UPS. ";
else
cout << "\nDelivery Method should be one of MS, Mp, FS, FO or UP";
}
else
cout << "\nLength of the partnumber should be 4 or 5 characters.";
return 0;
}
3 IntelliSense: identifier "cout" is undefined c:\Cpp8\Chap 13\Intermediate26 Project\Intermediate26 Project\Intermediate26.cpp 7 2 Intermediate26 Project
4 IntelliSense: identifier "cin" is undefined c:\Cpp8\Chap 13\Intermediate26 Project\Intermediate26 Project\Intermediate26.cpp 8 2 Intermediate26 Project
2 IntelliSense: cannot open source file "iostream.h" c:\Cpp8\Chap 13\Intermediate26 Project\Intermediate26 Project\Intermediate26.cpp 1 1 Intermediate26 Project
Error 1 error C1083: Cannot open include file: 'iostream.h': No such file or directory c:\cpp8\chap 13\intermediate26 project\intermediate26 project\intermediate26.cpp 1 1 Intermediate26 Project
Last edited on Nov 16, 2016 at 2:28am UTC