Files
stergios/include/io.h
T

29 lines
769 B
C
Executable File

#ifndef IO_H
#define IO_H
#include "utils.h"
/*
* @brief Reads three 128 bit integers from the user with a prompt
* @param prompt The message to display to the user before reading input
* @param a Pointer to store the first integer
* @param b Pointer to store the second integer
* @param c Pointer to store the third integer
* @return 0 on success, -1 on printf error, -2 on scanf error
*/
int read_int128_triplet(const char* prompt, int128_t* a, int128_t* b, int128_t* c);
/*
* @brief Converts a string to a 128 bit integer
* @param s The string to convert
* @return The converted 128 bit integer
*/
int128_t str_to_int128(const char* s);
/**
* @brief Prints a 128 bit integer
* @param n The integer to print
*/
void print_int128(int128_t n);
#endif