I am currently working on a code for a class I have and have been reading the text book and searching online for a way to get to the solution but so far nothing has made any sense. I need to make a code that can find the remainder of a very large number that is found from a .txt file. I understand the division behind the problem I just dont understand how to put it into code. If someone could give me a push in the right direction that would be amazing.
Problem:
Write program that computes the remainder of very long integer number that cannot be stored in C++ as in int type. You will get this long numbers from input data file and calculate the remainder when this number is divided by 97.
Sample Input:
1234567898765432
22222222222222222222222222222222
3333333333333333333333333333333333333333
3214282912345698765432161182
This is an outline for the code:
#include <cstdlib> //the standard C library header
#include
int main()
{
std::string si = "12";
int i = atoi(si.c_str()); //the c_str() function "converts"