A clean machine is a clean machine :-)
Answer:
1. cout << "Num: " << songNum << endl;
2. cout << songNum << endl;
3. cout << songNum <<" songs" << endl;
Explanation:
//Full Code
#include <iostream>
using namespace std;
int main ()
{
int songNum;
songNum = 5;
cout << "Num: " << songNum << endl;
cout << songNum << endl;
cout << songNum <<" songs" << endl;
return 0;
}
1. The error in the first cout statement is that variable songnum is not declared.
C++ is a case sensitive programme language; it treats upper case and lower case characters differently.
Variable songNum was declared; not songnum.
2. Cout us used to print a Variable that has already been declared.
The error arises in int songNum in the second cout statement.
3. When printing more than one variables or values, they must be separated with <<
Answer:
Complete answer to the question is explained in the attached files.please have a look on it.
Explanation:
Answer:
(a) E = 0 N/C
(b) E = 0 N/C
(c) E = 7.78 x10^5 N/C
Explanation:
We are given a hollow sphere with following parameters:
Q = total charge on its surface = 23.6 μC = 23.6 x 10^-6 C
R = radius of sphere = 26.1 cm = 0.261 m
Permittivity of free space = ε0 = 8.85419 X 10−12 C²/Nm²
The formula for the electric field intensity is:
E = (1/4πεo)(Q/r²)
where, r = the distance from center of sphere where the intensity is to be found.
(a)
At the center of the sphere r = 0. Also, there is no charge inside the sphere to produce an electric field. Thus the electric field at center is zero.
<u>E = 0 N/C</u>
(b)
Since, the distance R/2 from center lies inside the sphere. Therefore, the intensity at that point will be zero, due to absence of charge inside the sphere (q = 0 C).
<u>E = 0 N/C</u>
(c)
Since, the distance of 52.2 cm is outside the circle. So, now we use the formula to calculate the Electric Field:
E = (1/4πεo)[(23.6 x 10^-6 C)/(0.522m)²]
<u>E = 7.78 x10^5 N/C</u>