Starting from:

$30

COP290 Big Number Calculator Assignment 3 Solved

Assignment 3 

•       In this assignment, you have to implement Arithmetic Operations for a very large number (Even larger than long long int).

•       Basic operations which are needed to be implemented are: Addition, Subtraction, Multiplication and Division.

•       Other operations includes: square root, Absolute value and power.

•       Programming languages allowed are ANSI-C and C++.

•       You are only allowed to use stdio, string and other libraries which inherently doesn’t implement big number library.

•       Your submission should contain a zipped folder whose name is your entry number and should contain the folder having all the .c /.cpp files and a makefile.

§  e.g. Your submission will have a zip folder(2018MCS2018.zip) which contains another folder(2018MCS2018) having all codes and makefile

•       Your main executable should be named as mainfile which is made by make command.

•       mainfile should take two command line arguments i.e. <Name of Input file and <Name of

Output file

§  Your code should run like:  ./mainfile   input.txt   output.txt 

•       Input.txt (i.e. the input file) will contain the different queries, corresponding to each arithmetic operations. 

•       Query Format: Each line of input file corresponds to a query which is in the format: 

§  <Operator<SPACE <Operand 1<SPACE <Operand 2 if required  Operator can be one of the strings: ADD, SUB, MUL, DIV, SQRT, ABS, POW  Operand will be String representing a floating point decimal number. 

•       For each query, you have to print a single lined output in Output.txt which is also a string corresponding to floating point decimal number. 

•       You need to handle the cases where the operand or results are negative values. 

•       Please refer to sample input files with corresponding output files for further details. 

•       For floating point results the precision should be correct up to 20 digits after decimal point. 

 

More products