my adventure with code my first project
A basic calculator program in C that runs in the terminal.
It supports the following operations:
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
/) - Modulo (
%)
This project is a great starting point for beginners learning C programming, switch statements, and basic arithmetic operators.
Division by Zero → Prints an error message instead of crashing.
Modulo by Zero → Prints an error message instead of crashing.
Invalid Operator → Prints "Error: Invalid operator."
#include <stdio.h> → Standard I/O library
switch-case → Control flow in C
Typecasting → (int)n1 % (int)n2 for modulo operation
Error handling for invalid input
A simple Number Guessing Game written in C where the computer randomly chooses a number between 1 and 100, and the player has to guess it within limited attempts.
- Random number generation using
rand()seeded with current time. - Player gets 10 attempts to guess the number.
- Hints provided:
- Too high if the guess is larger than the number.
- Too low if the guess is smaller than the number.
- Game ends when:
- The player guesses correctly 🎉
- OR runs out of attempts 😢
- The program picks a random number between 1 and 100.
- The user enters guesses one by one.
- The game gives feedback after every guess.
- The game ends when the number is guessed correctly or attempts are finished.
This is my first ever project 🎉
This is my first ever Python project 🎉
A simple command-line expense tracker where you can:
- Add expenses 💵
- List all expenses 📋
- View total expenses ➕
- Filter expenses by category 🔍
- Exit the program ❌
A fun and simple command-line dice rolling game written in C.
Every time you roll, you get a random number between 1 and 6.
You can keep rolling until you decide to stop.
- Generates a random dice roll (1–6) 🎲
- Lets you roll again with Y/y
- Option to quit with N/n
- Beginner-friendly project for learning loops, randomness, and user input
(On Windows use dice_game.exe)
📝 Example Gameplay scss Copy code Welcome to the dice rolling Game! you rolled 4 roll again(y/n): y you rolled 2 roll again(y/n): y you rolled 6 roll again(y/n): n Thanks for playing
rand() and srand(time(0)) → random number generation
do { ... } while() loop → repeat until user quits
scanf(" %c", &choice) → handle user input
Basic control flow and loops in C
this is the second version of the dice rolling game eliminating y/n choice with a easier enter button
A simple command-line dice rolling game written in C.
Press ENTER to roll the dice, or type any other key and press ENTER to quit.
Perfect beginner project to practice loops, random numbers, and user input handling in C.
- Roll a 6-sided dice 🎲
- Infinite rolls until you quit
- Random outcomes on every roll
- Simple and interactive terminal-based gameplay
rand() and srand(time(0)) → random number generation
do { ... } while() loop → repeat until user quits
scanf(" %c", &choice) → handle user input
Basic control flow and loops in C
A simple command-line guessing game written in C.
The computer randomly picks a letter between A and Z, and you have to guess it within a limited number of attempts.
- Randomly selects a letter (A–Z) 🎯
- User-friendly hints:
"Too high!"→ Your guess is later in the alphabet"Too low!"→ Your guess is earlier in the alphabet
- Maximum 8 attempts to guess correctly
- Case-insensitive input (e.g.,
aorAworks the same) - Beginner-friendly project for practicing loops, conditionals, random numbers, and character handling
rand() and srand(time(0)) → Random letter generation
toupper() from <ctype.h> → Case-insensitive comparison
do { ... } while() loop → Multiple attempts until limit
Input handling with scanf()
Conditional logic (if, else if, else)
A simple Tic Tac Toe game written in C for two players.
Players take turns entering their moves until one wins or the game ends in a draw.
- Two-player mode (
XvsO) - Displays the game board after every move
- Detects winners across rows, columns, and diagonals
- Declares a draw if the board is full
- Input validation (prevents overwriting cells)
2D arrays (board[3][3]) to store the game board
Functions for board initialization, printing, and winner checking
Loops to keep the game running until a result
Conditionals for move validation and winner detection
Ternary operator to switch between players
A simple console-based memory game written in C language. The player must remember a sequence of random numbers and re-enter them correctly to progress through levels. The game continues until the player makes a mistake or successfully completes all levels.
Random sequence generation using rand().
Increasing difficulty with each level.
User-friendly prompts to enter the sequence.
Game over message with the correct sequence shown.
Cross-platform support for clearing the screen (cls for Windows, clear for Linux/macOS).
Maximum of 20 levels.
Sequence generation: Generates random digits (0–9) using rand().
Display sequence: Shows the current level’s sequence for the user to memorize.
User input: Prompts the user to re-enter the sequence.
Validation: Compares input with the generated sequence.
Progression: Moves to the next level if correct, otherwise ends the game.
This project demonstrates:
Loops (for, while)
Arrays
Random number generation (rand())
Conditional logic (if-else)
Functions from <stdio.h>, <stdlib.h>, and <time.h>