Skip to content

Instantly share code, notes, and snippets.

#include<iostream>
#include<cmath>
#define PI 3.14159265
using namespace std;
int main()
{
//g stands for the acceleration due to gravity near the surface of the earth
//eg:roughly 9.81m/s^2
double g = 9.81;
@Tah1WhoKnocks
Tah1WhoKnocks / CIS210 2.23.1 Solution
Created January 23, 2019 04:21
zyBooks Solution for ch2 Lab Activity; CIS210
#include <iostream>
#include <cmath> // Note: Needed for math functions in part (3)
using namespace std;
int main() {
double wallHeight;
double wallWidth;
double wallArea;
cout << "Enter wall height (feet):" << endl;
@Tah1WhoKnocks
Tah1WhoKnocks / arrayfun.cpp
Created January 16, 2019 19:39
Day 2 of my goal to program something everyday for the foreseeable future
//It doesn't get simpler than this
//This is just some code I wrote to learn how to use arrays in c++
#include <iostream>
using namespace std;
int main() {
string command = "print";
int test [5] = {1,2,3,4,5};
while(command!="end"){
@Tah1WhoKnocks
Tah1WhoKnocks / count.cpp
Last active January 16, 2019 19:01
Simple c++ program; counts to a specified number starting from 1
#include <iostream>
using namespace std;
//back in the saddle again
int main() {
string loop = "y";
int woo;
while(loop=="y"){
cout << "input number to count!!! ";
cin >> woo;
cout << "Great!!!" <<endl;