Welcome
MD. MOBAROK KARIM
MD. Mobarok Karim
CSE • UITS
Anime Dark Mode

MD. Mobarok Karim

CSE student at UITS. Passionate about systems, algorithms, and anime-themed design. I work in C, C++, and Python.

Skills

Languages & tools
C
C++
Python
Codeforces Beginner Level
Handle: arafatkarim236
Problems solved: 20+ • Currently learning and improving

Projects

C / C++ work
CGPA Calculator
Calculates a student's cumulative grade point average based on course grades and credits.
+
#include <iostream>
using namespace std;

int main() {
    int n;
    float totalPoints = 0, totalCredits = 0;

    cout << "Enter number of courses: ";
    cin >> n;

    for(int i = 0; i < n; i++) {
        float grade, credit;
        cout << "Enter grade and credit for course " << i+1 << ": ";
        cin >> grade >> credit;
        totalPoints += grade * credit;
        totalCredits += credit;
    }

    cout << "Your CGPA: " << totalPoints / totalCredits << endl;
    return 0;
}
Rock Paper Scissors Game
A simple game where users play against the computer, choosing between rock, paper, or scissors.
+
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;

int main() {
    srand(time(0));
    int user, computer;

    cout << "Rock(1), Paper(2), Scissors(3): ";
    cin >> user;

    computer = rand() % 3 + 1;

    if(user == computer) cout << "Draw!";
    else if((user == 1 && computer == 3) ||
            (user == 2 && computer == 1) ||
            (user == 3 && computer == 2))
        cout << "You Win!";
    else cout << "Computer Wins!";

    return 0;
}
Casino Number Guessing Game
Players guess a random number generated by the computer to win prizes based on difficulty.
+
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;

int main() {
    srand(time(0));
    int balance = 100, bet, guess, number;

    while(balance > 0) {
        number = rand() % 10 + 1;
        cout << "Balance: $" << balance << "\nBet amount: ";
        cin >> bet;

        cout << "Guess (1-10): ";
        cin >> guess;

        if(guess == number) {
            balance += bet * 10;
            cout << "You won! ";
        } else {
            balance -= bet;
            cout << "Wrong! Number was " << number;
        }
        cout << endl;
    }

    cout << "Game Over!";
    return 0;
}
Scientific Calculator
Performs basic and advanced mathematical operations, including trigonometric functions.
+
#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int choice;
    double a, b;

    cout << "1.Add 2.Sub 3.Mul 4.Div 5.Sin 6.Cos 7.Tan\n";
    cin >> choice;

    if(choice <= 4) {
        cout << "Enter two numbers: ";
        cin >> a >> b;
    } else {
        cout << "Enter angle (degrees): ";
        cin >> a;
        a = a * M_PI / 180;
    }

    switch(choice) {
        case 1: cout << a + b; break;
        case 2: cout << a - b; break;
        case 3: cout << a * b; break;
        case 4: cout << a / b; break;
        case 5: cout << sin(a); break;
        case 6: cout << cos(a); break;
        case 7: cout << tan(a); break;
    }
    return 0;
}
Login and Registration System
Manages user credentials, allowing registration and login functionalities.
+
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

void registerUser() {
    string username, password;
    cout << "Enter username: "; cin >> username;
    cout << "Enter password: "; cin >> password;

    ofstream file("users.txt", ios::app);
    file << username << " " << password << endl;
    file.close();
    cout << "Registration successful!\n";
}

void login() {
    string u, p, username, password;
    cout << "Username: "; cin >> username;
    cout << "Password: "; cin >> password;

    ifstream file("users.txt");
    bool found = false;
    while(file >> u >> p) {
        if(u == username && p == password) {
            found = true; break;
        }
    }
    cout << (found ? "Login successful!" : "Invalid!") << endl;
}

int main() {
    int choice;
    cout << "1.Register 2.Login: ";
    cin >> choice;
    choice == 1 ? registerUser() : login();
    return 0;
}
ATM Simulation
ATM system with deposit, withdraw, and balance check features.
+
#include <stdio.h>

int main() {
    float balance = 0, amount;
    int choice;

    do {
        printf("\n1.Check 2.Deposit 3.Withdraw 4.Exit\n");
        scanf("%d", &choice);

        switch(choice) {
            case 1:
                printf("Balance: %.2f BDT\n", balance);
                break;
            case 2:
                printf("Deposit: ");
                scanf("%f", &amount);
                balance += amount;
                break;
            case 3:
                printf("Withdraw: ");
                scanf("%f", &amount);
                if(amount <= balance)
                    balance -= amount;
                else
                    printf("Insufficient!\n");
                break;
        }
    } while(choice != 4);

    return 0;
}