Answer:
The output of the given question is :
Person
Person
Explanation:
Following are the description of Statements
- The new Person().printPerson(); calling the function of printPerson() of the class Person so it returns the Person in the console window.
- The new Student().printPerson(); calling the function of printPerson() of the class student .The student inherits the class Person So control will moves to the class it executed the statement inside the Person class So it executed the function public void printPerson() of the Person class so it also returns the Person String and execution of program become stops
Answer:
#include <iostream>
#include<cmath>
using namespace std;
int main()
{
double total = 0;
double check=1;
double ct=0;
double old=1;
while( fabs(total - old) > 0.00005 )
{
old=total;
total=total+check*4.0/(2.0*ct+1);
ct=ct+1;
check=0.0-check;
}
cout<<"Approximate value of pi is "<<total<<endl;
return 0;
}
Explanation:
- Initialize all the necessary variables.
- Run a while loop until the following condition is met.
fabs(total - old) > 0.00005
- Inside the while loop calculate the total value.
- Lastly, display the approximate value of pi.
Answer:
B and C for the most part but mainly C.
Explanation:
Answer:
You might not be referencing or point to the actual path to the image file. Check the Image Source.
Explanation:
Your Image might not display if you miss the actual image source.