This is a program that I have to make please somebody help me

The purpose of the task is to implement a program that reads the contents of a text

file (in.txt) and if it qualifies for an arithmetic expression set out below,

perform the specified arithmetic operation and record the results in a binary file (out.dat).

Arithmetic expression must meet the following conditions:

• is enrolled in a row;

• consists of two integer operands separated by the sign of arithmetic operation;

• arithmetic operations are permitted: "+" and "-";

• there is allowed an unlimited number of whitespace (space - '' and

char - '\ t') before and after the sign for simple operation;

• there is allowed an unlimited number of whitespace at the beginning and end of

arithmetic expression.

Example:

in.txt: "158 + 7"

out.txt: Contains binary written the number 165

Any Ideas guys ?

The purpose of the task is to implement a program that reads the contents of a text

file (in.txt) and if it qualifies for an arithmetic expression set out below,

perform the specified arithmetic operation and record the results in a binary file (out.dat).

Arithmetic expression must meet the following conditions:

• is enrolled in a row;

• consists of two integer operands separated by the sign of arithmetic operation;

• arithmetic operations are permitted: "+" and "-";

• there is allowed an unlimited number of whitespace (space - '' and

char - '\ t') before and after the sign for simple operation;

• there is allowed an unlimited number of whitespace at the beginning and end of

arithmetic expression.

Example:

in.txt: "158 + 7"

out.txt: Contains binary written the number 165

Any Ideas guys ?