Skip to content

Instantly share code, notes, and snippets.

@s3f
s3f / First C Program.c
Created December 29, 2016 22:40
First C Program created by s3f - https://repl.it/E4kH/0
#include <stdio.h>
main()
{
printf("Just one small step for coders. One giant leap for");
printf(" programmers!\n");
return 0;
}
@s3f
s3f / Chapter 2 - Strngs && Chars.c
Created December 29, 2016 22:41
Chapter 2 - Strngs && Chars created by s3f - https://repl.it/E58i/0
#include <stdio.h>
main ()
{
printf("I am learning the %c programming language\n", 'C');
printf("I have just completed Chapter %d\n", 2);
printf("I am %.1f percent ready to move on", 99.9);
printf("to the next chapter!\n");
return 0;
@s3f
s3f / Chapter 3 - Leaving Comments.c
Created December 29, 2016 22:42
Chapter 3 - Leaving Comments created by s3f - https://repl.it/E7zv/1
/* This chapter of the book goes over the concept of leaving comments and how helpful they can be in helping other people understand your code as well as helping you in the case of having to debug your code after a while */
/* I will definitely get into the habit of leaving comments from now on */
@s3f
s3f / Chapter 4 - Outputting Your Programs.c
Created December 29, 2016 22:42
Chapter 4 - Outputting Your Programs created by s3f - https://repl.it/E8AV/1
// First example program
/* #include <stdio.h> (REMEMBER: remove comment signs to run first program!)
main()
{
printf("Column A\tColumn B\tColumn C");
printf("\nMy Computer\'s Beep Sounds Like This: \a!\n");
printf("\"Lets fix that typo and then show the backslash ");
@s3f
s3f / Chapter 5- Variables.c
Created December 29, 2016 22:43
Chapter 5- Variables created by s3f - https://repl.it/E8f3/2
// This code below was a practice excercise I did that outputs some of my information
/* #include <stdio.h>
int main ()
{
printf("Name : Sef Sheek\n");
printf("Date Of Birth: 09/30/1993\n");
printf("Phone Number: 4447658383\n");
return 0;
@s3f
s3f / Chapter 6 - Adding Words to Your Program.c
Created December 29, 2016 22:44
Chapter 6 - Adding Words to Your Program created by s3f - https://repl.it/E9m0/1
/* WARMUP CODE
#include <stdio.h>
int main ()
{
char char1 = 'X';
char char2 = 'M';
char char3 = 'L';
@s3f
s3f / Chapter 7- Using #include and #define.c
Created December 29, 2016 22:45
Chapter 7- Using #include and #define created by s3f - https://repl.it/Easm/2
// The purpose of the warmup code below is to output is to practice displaying variables
/*
#include <stdio.h>
int main()
{
int a = 125, b = 12345;
long ax = 1234567890;
short s = 4043;
float x = 2.13459;
@s3f
s3f / Chapter 8 - Getting User Input.c
Created December 29, 2016 22:45
Chapter 8 - Getting User Input created by s3f - https://repl.it/EcYQ/3
// This sample program asks a user for some basic data and prints it on the screen in order to show what was entered.
#include <stdio.h>
main()
{
char firstInitial;
char lastInitial;
int age;
int favorite_number;
@s3f
s3f / Chapter 9 - Doing math with C.c
Created December 29, 2016 22:46
Chapter 9 - Doing math with C created by s3f - https://repl.it/Ed4H/2
// This first sample program is to practice with using math operators
/*
#include <stdio.h>
main()
{
float a = 19.0;
float b = 5.0;
@s3f
s3f / Chapter 10- Assignments and Expressions.c
Created December 29, 2016 22:46
Chapter 10- Assignments and Expressions created by s3f - https://repl.it/EdrJ/2
// This practice program increases a counter from 1 to 5 and then decreases it
#include <stdio.h>
main()
{
int ctr = 0;
ctr += 1;
printf("Counter is at %d.\n", ctr);