MAKE A PSEUDOCODE AND FLOWCHART C++ #include using namespace std; int checkifPrimenumber(int); int main() { bool prime; int count; cout<<"Enter the max number:"; cin>>count; int n=2; do { prime = checkifPrimenumber(n); if(prime == true) cout<
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
MAKE A PSEUDOCODE AND FLOWCHART C++
#include <iostream>
using namespace std;
int checkifPrimenumber(int);
int main() {
bool prime;
int count;
cout<<"Enter the max number:";
cin>>count;
int n=2;
do
{
prime = checkifPrimenumber(n);
if(prime == true)
cout<<n<<" ";
n=n+1;
}while(n<count);
return 1;
}
int checkifPrimenumber(int n) {
bool prime = true;
int i = 2;
do
{
if (n%i == 0)
{
prime = false;
}
i=i+1;
}while(i <= n/2);
return prime;
}
Step by step
Solved in 2 steps with 2 images