In: Computer Science
Assume that: float a, b, c, d, f; and variables b, c, d, f are initialized. Write a line of c++ code that calculates the formula below and stores the result to the variable a:
#include <iostream>
using namespace std;
int main()
{
//declare
float a,b,c,d,f;
//intialize
b=1.5;
c=2.3;
d=4.5;
f=9.54;
//caluclte sum of b,c,d,f and storing in a 'a'
a=b+c+d+f;
//print result
cout<<"result :"<<a;
return 0;
}
------------------------------------------------------------------------------------------------------------