In this project, I learned about using arithmetic, logical, relational, and boolean
operators in C. Additionally, I practiced declaring and defining variables of type
char, int, and unsigned int, using if and if...else statements, and
implementing while loops.
-
0. Positive anything is better than negative nothing
- 0-positive_or_negative.c: C program that prints whether
a randomly generated number is positive or negative, followed by a new line:
- Completion of this source code.
- Stores a different random number every time the program is run.
- Prints the number followed by
is positiveif the number is greater than 0,is zeroif the number is zero, oris negativeif the number is less than 0.
- 0-positive_or_negative.c: C program that prints whether
a randomly generated number is positive or negative, followed by a new line:
-
1. The last digit
- 1-last_digit.c: C program that prints the last digit of a
randomly generated number, followed by a new line:
- Completion of this source code.
- Stores a different value every time the program is run.
- Prints the string
Last digit of[number]is[last_digit]and isfollowed bygreater than 5if the digit is greater than 5,0if the digit is 0, orless than 6 and not 0if the digit is less than 6 and not 0.
- 1-last_digit.c: C program that prints the last digit of a
randomly generated number, followed by a new line:
-
2. I sometimes suffer from insomnia. And when I can't fall asleep, I play what I call the alphabet game
- 2-print_alphabet.c: C program that prints the alphabet in
lowercase, followed by a new line, using only the
putcharfunction exactly twice.
- 2-print_alphabet.c: C program that prints the alphabet in
lowercase, followed by a new line, using only the
-
3. When I was having that alphabet soup, I never thought that it would pay off
- 3-print_alphabets.c: C program that prints the alphabet in
lowercase, then in uppercase, followed by a new line, using only the
putcharfunction exactly three times.
- 3-print_alphabets.c: C program that prints the alphabet in
lowercase, then in uppercase, followed by a new line, using only the
-
4. alphABET
- 4-print_alphabt.c: C program that prints the alphabet in lowercase
except for the letters
qande, followed by a new line, using only theputcharfunction exactly twice.
- 4-print_alphabt.c: C program that prints the alphabet in lowercase
except for the letters
-
5. Numbers
- 5-print_numbers.c: C program that prints all single digit numbers
of base 10 starting from
0, followed by a new line.
- 5-print_numbers.c: C program that prints all single digit numbers
of base 10 starting from
-
6. Numberz
- 6-print_numberz.c: C program that prints all single digit numbers
of base 10 starting from
0, followed by a new line, using only theputcharfunction exactly twice without any variables of typechar.
- 6-print_numberz.c: C program that prints all single digit numbers
of base 10 starting from
-
7. Smile in the mirror
- 7-print_tebahpla.c: C program that prints the lowercase alphabet
in reverse, followed by a new line, using only the
putcharfunction exactly twice.
- 7-print_tebahpla.c: C program that prints the lowercase alphabet
in reverse, followed by a new line, using only the
-
8. Hexadecimal
- 8-print_base16.c: C program that prints all the numbers of base
16 in lowercase, followed by a new line, using only the
putcharfunction exactly three times.
- 8-print_base16.c: C program that prints all the numbers of base
16 in lowercase, followed by a new line, using only the
-
9. Patience, persistence and perspiration make an unbeatable combination for success
- 9-print_comb.c: C program that prints all possible combinations of
single-digit numbers, using only the
putcharfunction exactly four times without any variables of typechar:- Numbers are separated by
,, followed by a space. - Numbers are printed in ascending order.
- Numbers are separated by
- 9-print_comb.c: C program that prints all possible combinations of
single-digit numbers, using only the
-
10. 00...99
- 10-print_comb2.c: C program that prints the numbers from
00to99using only theputcharfunction exactly five times without any variables of typechar:- Numbers are separated by
,, followed by a space. - Numbers are printed in ascending order, with two digits.
- Numbers are separated by
- 10-print_comb2.c: C program that prints the numbers from
-
11. Inventing is a combination of brains and materials. The more brains you use, the less material you need
- 100-print_comb3.c: C program that prints all possible different
combinations of two digits using only the
putcharfunction exactly five times without any variables of typechar:- Numbers are separated by
,, followed by a space. - The two digits are different.
01and10are considered the same combination of the two digits0and1.- Prints only the smallest combination of two digits.
- Numbers are printed in ascending order.
- Numbers are separated by
- 100-print_comb3.c: C program that prints all possible different
combinations of two digits using only the
-
12. The success combination in business is: Do what you do better... and: do more of what you do...
- 101-print_comb4.c: C program that prints all possible different
combinations of three digits using only the
putcharfunction exactly six times without any variables of typechar:- Numbers are separated by
,, followed by a space. - The three digits are different.
012,120,102,021,201and210are considered the same combination of the three digits0,1and2.- Prints only the smallest combination of three digits.
- Numbers are printed in ascending order.
- Numbers are separated by
- 101-print_comb4.c: C program that prints all possible different
combinations of three digits using only the
-
13. Software is eating the World
- 102-print_comb5.c: C program that prints all possible combinations
of two-digit numbers using only the
putcharfunction exactly eight times without any variables of typechar:- Numbers range from
0to99. - Two numbers are separated by a space.
- Numbers are printed with two digits [ie.
1is printed as01]. 00 01and01 00are considered the same as the combination of of the numbers0and1.- Combinations of numbers are separated by
,, followed by a space. - Combinations of numbers are printed in ascending order.
- Numbers range from
- 102-print_comb5.c: C program that prints all possible combinations
of two-digit numbers using only the