Answer:
see explaination
Explanation:
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
double temp1,temp2,inc,cel;
int i=1;
while(i==1)
{
i=0;
cin>>temp1>>temp2>>inc;
if(temp2<temp1||inc<=0)
{
i=1;
cout<<"Starting temperature must be <= ending temperature and increment must be >0.0\n";
}
}
cout<<endl;
cout<<setw(15)<<"Fahrenheit"<<setw(15)<<"Celsius";
while(temp1<=temp2)
{
cel=(temp1-32)/1.8;
cout<<endl;
cout<<fixed<<setprecision(3)<<setw(15)<<temp1<<setw(15)<<cel;
temp1+=inc;
}
}
Please kindly check attachment for output.
Answer: dependent
Explanation:
A Cells containing formulas which refer to other cells are known as dependents.
These are cells that depend on values in the selected cell.
A dependents cell can either contain a formula or a constant value.
(Ctrl + ] ) Is used as a shortcut when selecting dependents cells in an active cell.
Another option is to make use of you (Tools > Formula Auditing > Trace Precedents).
Answer:
double x = 2.5;
double y = -1.5;
int m = 18;
int n = 4;
string s = "Storm";
string t = "Watch";
The output of the expression "x + n*y - (x+n)*y" is "6.25".
and the output of expression "m/n + m%n" is "6".
Explanation:
for the first expression,
x + n*y - (x+n)*y ,put value of every variables in it.
=2.5+4*(-1.5)-(2.5+4)*(-1.5)
=2.5-6.0-(6.5*(-1.5)
=-3.5+9.75
=6.25
for the second expression,
m/n + m%n, put value of every variables in it.
=18/4 +18%4
=4+2 ("/ will give quotient and % will give remainder")
=6
Answer:
The correct loop is as follows:
for year in range(starting_tuitionYear, ending_tuitionYear, increment):
tuition = startingTuition + rate * startingTuition
startingTuition = tuition
print('Tuition for the year of ' + str(year)+ ' is ' + str(tuition));
Explanation:
Required
The correction to the attached program
Some variables are not needed; so, I've removed the redundant variables.
The main error in the program is in the loop;
After the tuition for each year has been calculated, the startTuition of the next year must be set to the current tuition
<em>See attachment for complete program</em>