C programs
Here you'll find some simple programs I made while learning the C
language. To run these programs you can use some online compiler such
as Online GDB or
Programiz.
They are all inside of my Example C programs repository
-
Drawing a graph of quadratic function -
This program draws a graph of function (in the region from x = -2 to
x = 2) using "#" sign. The user can enter 3 real numbers a, b, and c
that make up the function y=ax^2+bx+c, and the program returns the
graph.
-
"Utrovački" translator - Utrovački iz a
very specific type of slang in Serbian language, in which words are
changed according to a specific rule. First the word is split in two
parts: the first part consists of the first sylable, and the second
part, the rest of the word. Then "utrovački" version of the word is
composed according to the following rule: U + last part + ZA + first
part + NJE. So the word "pivo" (beer in Serbian) would become
uvozapinje in utrovački. The program does this transformation
automatically.
-
Word transformer - Another slang transformer,
this one transforms wors like patike into papatipikepe, that is, after each sylable
it adds the letter "p" and repeats the vocal of that sylable.
-
Eight directions text star -
This is a simple program, that writes the word you enter, in all
eight direction, starting from the center, and forming a star.
-
Teleport -
An adventure game in which you can teleport between 9 cities in the world,
while pursuing 2 possible goals: arriving from Tokyo to Paris in least steps,
or visiting all the cities at least once. The problem is that you can teleport
only to two most distant cities (with some exceptions). Also, you might, depending on your goal choice,
spend money to teleport, or earn score. The game keeps track of number of unique cities
you visited, number of times you visited each city, money, score and even kilometers traveled.
-
Website Simulator -
A C program in which the functioning and looks of a small static website are fully simulated.