Skip to content

Instantly share code, notes, and snippets.

View NotaPhysicist's full-sized avatar

Timothy Carter NotaPhysicist

  • Perth, Australia
View GitHub Profile
@NotaPhysicist
NotaPhysicist / gist:8eaf61940afff6271689a87fe72f5dee
Created December 11, 2019 17:29
A program to print a requested character in requested rows and columns
/* chline.c -- A program to print a requested character in requested rows and columns */
#include <stdio.h>
#include <stdlib.h>
char getcharacter(void);
int getint(void);
void printchar(char character, int rows, int cols);
int main(void)
@NotaPhysicist
NotaPhysicist / chline.c
Created December 11, 2019 18:31
A program to print a requested character in requested rows and columns using a nested for loop and putchar().
/**
* chline.c
*
* A program to print a requested character in requested
* rows and columns using a nested for loop and putchar
*/
#include <stdio.h>
#include <stdlib.h>
@NotaPhysicist
NotaPhysicist / putchar.c
Created December 11, 2019 18:35
Playing around with printing a grid of characters using for loops and putchar() and passing arguments in functions.
/**
* putchar.c -- playing around with printng a grid of characters using
* for loops and putchar and passing arguments in functions
*/
#include <stdio.h>
#include <stdlib.h>
void printchar(char ch, int rows, int cols);