Page 1 of 1

A complete C++ program with the output Develop a C++ application to implement floating point addition algorithm by assum

Posted: Sun Jul 10, 2022 11:31 am
by answerhappygod
A Complete C Program With The Output Develop A C Application To Implement Floating Point Addition Algorithm By Assum 1
A Complete C Program With The Output Develop A C Application To Implement Floating Point Addition Algorithm By Assum 1 (179.9 KiB) Viewed 75 times
Please i need you to follow the same pattern as the codeabove
I need comments on the code and a screenshot of the codeand the output too Please !!!
A complete C++ program with the output Develop a C++ application to implement floating point addition algorithm by assuming positive numbers only, use the following pattern to start the code. #include <iostream> #include <string> int main() { // first input: 3.25 int A_sign = 0; int A exponent = 128; std::string A_fraction = "1.10100000000000000000000"; std::cout << "1st input: " 11 sign: << A_sign << 11 11 "1 exponent: << A_exponent << fraction " << A fraction << std::endl; // second input: 11.5 int B_sign = 0; int B_exponent = 130; std::string B_fraction = "1.01110000000000000000000"; std::cout << "2nd input: " "1 sign: " << B sign << 11 exponent: << B exponent << " fraction " << B fraction << std::endl; 11 // implement addition algorithm here // Print sign, exponent, and fraction of final result return 0; } Verify your implementation is correct by comparing against expected outputs: • Sign: 0• Exponent: 10000010 Fraction: 1.1101100000000000000000