Skip to content

Instantly share code, notes, and snippets.

View mattsegura's full-sized avatar
🎯
Focusing

Matthew mattsegura

🎯
Focusing
View GitHub Profile
@mattsegura
mattsegura / colormixer.cpp
Created November 21, 2020 05:18
primary colors basic program
#include <iostream>
using namespace std ;
int main()
{
string color1,
color2;
cout << endl;
@mattsegura
mattsegura / main.cpp
Created November 26, 2020 07:21
randmathgame randmathgame
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
const int MIN_NUM = 0,
MAX_NUM = 999,
@mattsegura
mattsegura / array.cpp
Created November 26, 2020 07:39
simple array program demonstration, using string array and taking input from an array integer
#include <iostream>
#include <string>
using namespace std;
int main()
{
string myArray[3] = {"red", "blue", "orange"};
int numArray[5];
cout << myArray[0] << " ";
@mattsegura
mattsegura / array.cpp
Created November 26, 2020 07:45
elements of an array
//printing the elements of array
#include <iostream>
#include <array>
using namespace std;
int main()
{
int multi = 1;
int numArray[] = {1, 2, 3, 4};
@mattsegura
mattsegura / array.cpp
Created November 26, 2020 08:14
takes user input to output userinput with arrays
#include <iostream>
#include <array>
using namespace std;
int main()
{
int numArray[5];
for (int i = 0; i < 5; i++)
@mattsegura
mattsegura / main.cpp
Created November 26, 2020 08:43
simple array file input simple user file input for array
#include <iostream>
#include <array>
#include <fstream> // file stream
using namespace std;
int main()
{
const int WORKED_EMPLOYEE_HOURS = 6;
int hours[WORKED_EMPLOYEE_HOURS];
@mattsegura
mattsegura / main.cpp
Created December 1, 2020 22:53
bookcal
// book discounts
#include <iostream>
using namespace std;
int main()
{
const double book_price = 5.00;
// Variables
// book discounts
#include <iostream>
using namespace std;
int main()
{
const double book_price = 5.00;
// Variables
@mattsegura
mattsegura / bookpointsystem.cpp
Created December 4, 2020 08:21
simple else if statement utilizing a menu system
#include <iostream>
using namespace std;
int main()
{
int books, points, month;
cout << "How many books have you purchased this semester?\n";
cin >> books;
@mattsegura
mattsegura / simplewhileloop.cpp
Created December 5, 2020 06:30
application utilizing while loops, certain temp standard and tells the user to input again until theres an acceptable value
#include <iostream>
using namespace std;
int main()
{
double substance;
cout << "Enter the subtance tempteture: ";
cin >> substance;