The solution for this problem doesn\'t complete all of thetasks asked by the que
ID: 3613885 • Letter: T
Question
The solution for this problem doesn't complete all of thetasks asked by the question. The problem states that itwants the program to convert each decimal to an integer and thenfind the sum of tthe new integers. This solution clearly doesnot do that. The solution for this problem doesn't complete all of thetasks asked by the question. The problem states that itwants the program to convert each decimal to an integer and thenfind the sum of tthe new integers. This solution clearly doesnot do that.Explanation / Answer
please rate - thanks this better? #include using namespace std; int main() {float d1,d2,d3,d4,d5; int sum; int i1,i2,i3,i4,i5; coutd1>>d2>>d3>>d4>>d5; //convert to integers i1=static_cast(d1); i2=static_cast(d2); i3=static_cast(d3); i4=static_cast(d4); i5=static_cast(d5); //and then find sum sum=i1+i2+i3+i4+i5; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.