Answer:
public: virtual void print()=0;
Explanation:
An abstract class contains a pure virtual function. Pure virtual class cannot be instantiated but it can be subclassed and the subclass can provide an implementation of the function.
A virtual function declaration in the class is preceded by the virtual keyword. For example, virtual void print();
A pure virtual function declaration is followed by '=0;'
public: virtual void print()=0;
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int n;
double average,sum=0,x;
cout<<"enter the Value of N:";
// read the value of N
cin>>n;
cout<<"enter "<<n<<" Numbers:";
// read n Numbers
for(int a=0;a<n;a++)
{
cin>>x;
// calculate total sum of all numbers
sum=sum+x;
}
// calculate average
average=sum/n;
// print average
cout<<"average of "<<n<<" Numbers is: "<<average<<endl;
return 0;
}
Explanation:
Read the total number from user i.e "n".Then read "n" numbers from user with for loop and sum them all.Find there average by dividing the sum with n.And print the average.
Output:
enter the Value of N:5
enter 5 Numbers:20.5 19.7 21.3 18.6 22.1
average of 5 Numbers is: 20.44
Answer:
Multiple devices can be connected
I = V/R. So the answer is 9/200 = 0.045A = 45mA which is B
Incomplete question. I could only infer you are possibly referring to edhesive unit 8 questions. Here are a few sample questions;
1. Where does Python start?
2. To create the body of a function, we ____________ the code.
Answer:
1. Main Section
2. Indent
Explanation:
1. It is a common rule in Python programming language when coding for for it to begin at the first part of the Main Section.
2. Indenting a code involves creating space or jumping a line away from the margin of the text dialogue box, thus the code written there becomes the body of the function.