Giter Site home page Giter Site logo

glennlopez / cpp.playground Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 7.0 110.28 MB

:octocat: educational repo for storing my practice sessions with ASM, C and C++ as well as solutions to online courses I take relating to ASM, C, and C++ programming

C++ 74.59% Python 0.48% C 24.92%
zybooks c cpp practice assemly codingame-solutions hackerrank-solutions ebooks

cpp.playground's Introduction

glennlopez glennlopez

Ashutosh's github activity graph

glennlopez

glennlopez

Hi! ๐Ÿ––

I'm Glenn, a self-taught programmer, maintainer and enthusiast of all things open-sourced. My experience and background is mainly in electronics and aerospace but enjoy writing code for fun/as a hobby. I take great care in the experience, architecture, and quality of all the things I build. Outside of programming, I enjoy working on embedded systems (microcontrollers and FPGAs), 3D modeling, graphics design, MCAD, ECAD, computer aided machining, and dabbling in Cyber Security (Capture the Flag). Currently I'm working on an Open-hardware STM32F4 flight controller development board for low-cost DIY FPV drones.

๐Ÿ“Š This week, I spent my time coding in:

C++   39 mins         โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   100.00 %

glennlopez

Thank you @ccyndimolina for beign a first sponsor!

cpp.playground's People

Contributors

a-star0 avatar aspalmer5 avatar austinlittle2020 avatar awwillard avatar beckahenryl avatar chayan-dev avatar glennlopez avatar stevexero avatar tathagatvikash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cpp.playground's Issues

simon says

#include // for I/O
#include // for strlen()
#include // for random numbers
#include <unistd.h> // for sleep()
#include "ZyLab.h" // for ZyLab Setup
using namespace std;

int main(int argc, char **argv) {

const int DEFAULT_NUMBER_OF_ROUNDS = 15;
int numRounds = DEFAULT_NUMBER_OF_ROUNDS;

// if a command line argument is given, use that string to init the
// "random" sequence and set the number of rounds to play the game
if (argc == 2) {
numRounds = strlen(argv[1]);
}

string s; // A string used to pause the game
char c; // The player's typed characters
char *seq = new char[numRounds]; // Sequence of numRounds colors to match
char colors[] = "RGBY"; // Allowable colors
bool lost = false; // Indicates whether we win or lose
int round; // Indicates the current round

// Initialize random number generator
srand(time(0));

// Determine the random color sequence using either argv[1] or
// randomly determined letters from 'R', 'G', 'B', and 'Y'
for (int j = 0; j < numRounds; j++) {
seq[j] = (argc == 2) ? argv[1][j] : colors[rand() % 4];
}

// Wait until the player is ready
cout << "Welcome to Simon, press enter to play .... ";
getline(cin, s, '\n');

/* Type your code here. */

return 0;
}

3.3.2 if-else statement for zybook

#include
using namespace std;

int main() {
int userNum1;
int userNum2;

userNum1 = 0;
userNum2 = 14;

if (userNum1 < 0) {
cout << "userNum1 is negative." << endl;
}
if (userNum2 <= 12) {
cout << "userNum2 is less than or equal to 12." << endl;
}
if (userNum2 > 12) {
userNum2 = 0;
}
else (userNum2 = userNum2);
cout << "userNum2 is " << userNum2 << endl;

return 0;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.