Skip to content

Instantly share code, notes, and snippets.

View exquisitecoder-69's full-sized avatar

exquisitecoder-69

View GitHub Profile
@exquisitecoder-69
exquisitecoder-69 / Money_problems
Created October 26, 2025 13:18
Programming_club_DC
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
// For printing doubles till 5 digits after decimal
void print_truncated(double num) {
double shifted = num * 100000.0;
double truncated_shifted = floor(shifted);
double final_num = truncated_shifted / 100000.0;