Answer:
Without Recursives
// Program is written using C++
// Comments are used for explanatory purpose
int main()
{
// Declare integer number, n
int n;
cout<<"Enter number of starts to print"
cin>>n;
// Iterate through to print * pattern
for(i=n; i>0;i--)
{
for(j=n; i>j-1;j--)
{
cout<<"*";
}
cout<"\n";
}
for(i=0; i< n; i++)
{
for(j=0;j<=i;j++)
{
cout<<"*";;
}
cout<"\n";
}
return 0;
}
Using Recursive
#include <iostream>
using namespace std;
void printStars(int lines);
int main()
{
// prompt the user to enter a number
int lines;
cin>> lines;
printStars(int lines);
return 0;
}
void printStars(int lines)
{
if (lines < 1)
return;
// to print the stars of a particular row
if (i <= lines)
{
cout << "* ";
// recursively print rest of the stars
// of the row
printPatternRecur(lines, i + 1);
}
else
{
// change line
cout << endl;
// print stars
printPatternRecur(lines-1, 1);
}
}
Answer:
See explaination
Explanation:
Please kindly check attachment for step by step solution of the given problem represented as a flow chart.
Answer:
There are three basic Boolean operations: JOIN (Union), CUT (Difference), and INTERSECT. ... The CUT operation subtracts the volume of one solid object from the other solid object. The INTERSECT operation keeps only the volume common to both solid objects.
Answer:
<u>True</u>
Explanation:
According to Investopedia.com, "Disruptive technology is an innovation that significantly alters the way that consumers, industries, or businesses operate".
So yes, a disruptive does radically change the way people live and work.
Answer:
$958.25
Explanation:
PV = FV(1 +r)^(-t) . . . . present value of an amount earning rate r compounded annually for t years
PV = $3000(1.08^-5) ≈ $2041.75
The equivalent present value is $2041.75.
__
This amount is less than the offered amount by ...
$3000 -2041.75 = $958.25
She should pay you $958.25 less in order to make the offers equivalent.