Explanation:
We should see scaling well as referring to problems that can well be solved using computation. Two real-world examples are:
- problems involving finding the largest or smallest of several lists of numbers: Usually, a simple program executed to lookup the data set to determine which number fits the properties needed.
- problems involving equations: By computing the variables (x, y, etc) that make up the equation, and the operations (eg, addition, division) to be performed on the variables the problem can be solved well.
Answer:
// This program is written in C++ programming language
// Comments are used for explanatory purpose
// Program starts here
#include<iostream>
using namespace std;
int main ()
{
// Declare and initialize variables
float connecfee = 1.99;
float first3 = 2.00;
float addmin = 0.45; float cost;
int minutes;
// Prompt user for minutes talked
cout<<"Enter Number of Minutes: ";
cin>>minutes;
// Calculate cost;
if(minutes < 1)
{
cout<<"Enter a number greater than 0";
}
else if(minutes <= 3)
{
// Calculating cost for minutes less than or equal to 3
cost = connecfee + first3 * minutes;
cout<<"Talk time of "<<minutes<<" minutes costs "<<cost;
}
else
{
cost = connecfee + first3 * 3 + addmin * (minutes - 3);
cout<<"Talk time of "<<minutes<<" minutes costs "<<cost;
}
return 0;
}
// End of Program
A bottom up approach because group of a set choices can’t be the answer