64 511
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #34015 in C++ for Harkirat Singh

Question #34015
Write a c++ program to find the sum of 0.123  103 and 0.456  102 and write the result in
three significant digits.
Expert's answer
#include <stdio.h>
#include <stdlib.h>
//main function
int main(int argc, char *argv[]){
double sum;//variable for sum
sum=0.123+103;//add
printf("%.3f
",sum);//%.3f mean significant digits
sum= 0.456 +102;//add
printf("%.3f
",sum);//%.3f mean significant digits
system("PAUSE");//delay
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions