This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std ; | |
int main() | |
{ | |
string color1, | |
color2; | |
cout << endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
using namespace std; | |
int main() | |
{ | |
const int MIN_NUM = 0, | |
MAX_NUM = 999, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string myArray[3] = {"red", "blue", "orange"}; | |
int numArray[5]; | |
cout << myArray[0] << " "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//printing the elements of array | |
#include <iostream> | |
#include <array> | |
using namespace std; | |
int main() | |
{ | |
int multi = 1; | |
int numArray[] = {1, 2, 3, 4}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
using namespace std; | |
int main() | |
{ | |
int numArray[5]; | |
for (int i = 0; i < 5; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
#include <fstream> // file stream | |
using namespace std; | |
int main() | |
{ | |
const int WORKED_EMPLOYEE_HOURS = 6; | |
int hours[WORKED_EMPLOYEE_HOURS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// book discounts | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
const double book_price = 5.00; | |
// Variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// book discounts | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
const double book_price = 5.00; | |
// Variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int books, points, month; | |
cout << "How many books have you purchased this semester?\n"; | |
cin >> books; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
double substance; | |
cout << "Enter the subtance tempteture: "; | |
cin >> substance; |
OlderNewer