Assume there is already a variable called mycash and it has a value such as 123.45. write code to add 10.00 to the value of mycash and store the result as a new value of mycash.



Answer :

The program output will be 133.45. So, the variable mycash has the value 133.45 after executing the code. Because the initial value of the variable mycash is 123.45, when we add 10.00 to it, it becomes 133.45.

The code of the given scenario is written below using C++ language.

#include <iostream>

using namespace std;

int main()

{

   float mycash = 123.45;  /* variable mycash has floating point value i.e. 123.45*/

   cout<<"The previous value of mycash = "<< mycash<<endl; /* this simply shows  the current value of the variable mycash.*/

   mycash=mycash+10.00; /* float point value 10.00 is added to the previous value of variable mycash. It assigns the new value to the mycash variable after addition of 10.00.*/

   cout<<"The new value of mycash = "<< mycash; /* it outputs the new value of variable mycash.*/

   return 0;

}

You can learn more about floating point variables at

https://brainly.com/question/15025184

#SPJ4