# Answer on Algebra Question for shagufta

Question #30349

Write a c++ program to find the sum of 0.123 * 1000 and 0.456 * 100 and write the result in three significant digits.

Expert's answer

#include <iostream>

using namespace std;

int main()

{

double a=0.123 * 1000;

double b=0.456 * 100;

double c=a+b;

cout << "c= " <<c<< endl;

return 0;

}

using namespace std;

int main()

{

double a=0.123 * 1000;

double b=0.456 * 100;

double c=a+b;

cout << "c= " <<c<< endl;

return 0;

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment