You are on page 1of 3

Variable

----------

#include <iostream>
int main()
{
char letter = 'L';
char category = 'n';
unsigned char sound('x');
cout << "Pick " << Pick;
cout << category;
cout << "Sound " << sound;
return 0;
}
---------------------------------------------------
#include <iostream>
int main()
{
char Satisfaction, answer;
signed char ageCategory, size;
cout << "From A to Z, enter a character as your level of satisfaction: "
;
cin >> satisfaction;
cout << "Age category(t=teen/a=Adult/s=Senior): ";
cin >> ageCategory;
cout << "Are you drunk(y=Yes/n=No)? ";
cin >> answer;
cout << "Enter your size(s=Small/m=Medium/l=Large): ";
cin >> size;
cout << "\nSatisfaction: " << Satisfaction;
cout << "\nAge category: " << AgeCategory;
cout << "\nYour answer: " << Answer;
cout << "\nYour size: " << Size;
return 0;
}
--------------------------------------------------------------
#include <iostream>
int main()
{
short number1, number2;
cout << "Enter a number between -32768 and 32767: ";
cin >> number1;
cout << "Enter another number: ";
cin >> number2;
cout << "\nThe numbers you entered were\n";
cout << "\tNumber 1: " << number1 << "\n";
cout << "\tNumber 2: " << number2 << "\n";
return 0;
}
------------------------------
#include <iostream>
int main()
{
unsigned short shirts;
unsigned short pants;
unsigned short dresses;
unsigned short ties;
cout << " -=- Georgetown Cleaning Services -=-\n";
cout << "Enter number of shirts: ";
cin >> shirts;
cout << "Enter number of pants: ";
cin >> pants;
cout << "Enter number of dresses: ";
cin >> dresses;
cout << "Enter number of ties: ";
cin >> ties;
cout << "\n====================================";
cout << "\n-=- Georgetown Cleaning Services -=-";
cout << "\n====================================";
cout << "\nCustomer Order"
<< "\nItem Type Qty"
<< "\nShirts: " << shirts
<< "\nPants: " << pants
<< "\nDresses: " << dresses
<< "\nTies: " << ties
<< "\n\n";
return 0;
}
---------------------------------------
#include <iostream>
int main()
{
int coordX, coordY, coordZ;
cout << "Enter the coordinates of point A\n";
cout << "Horizontal X = ";
cin >> coordX;
cout << "Vertical Y = ";
cin >> coordY;
cout << "Depth Z = ";
cin >> coordZ;
cout << "\nOn a cartesian system, point A is located at";
cout << "\n\tX = " << coordX;
cout << "\n\tY = " << coordY;
cout << "\n\tZ = " << coordZ;
return 0;
}
-----------------------------------------------
#include <iostream>
using namespace std;
int main()
{
unsigned short shirts;
unsigned short pants;
unsigned short dresses;
unsigned short ties;
int orderDay;
int orderMonth;
int orderYear;
cout << " -=- Georgetown Cleaning Services -=-\n";
cout << "Enter the date this order was placed\n";
cout << "Order Day: ";
cin >> orderDay;
cout << "Order Month: ";
cin >> orderMonth;
cout << "Order Year: ";
cin >> orderYear;
cout << "Enter number of shirts: ";
cin >> shirts;
cout << "Enter number of pants: ";
cin >> pants;
cout << "Enter number of dresses: ";
cin >> dresses;
cout << "Enter number of ties: ";
cin >> ties;
cout <<
"\n====================================";
cout <<
"\n-=- Georgetown Cleaning Services -=-";
cout <<
"\n====================================";
cout <<
"\nCustomer Order";
cout <<
"\nOrder Date: " << orderMonth
<< '/' << orderDay << '/' << orderYear;
cout << "\n------------------------------------"
<< "\nItem Type Qty";
cout << "\n------------------------------------"
<< "\nShirts: " << shirts
<< "\nPants: " << pants
<< "\nDresses: " << dresses
<< "\nTies: " << ties
<< "\n\n";
return 0;
}

You might also like