Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
(Feb 04 2015, 04:32 AM)BlooD ZonE Wrote: [ -> ]Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
didnt know you do programming. >.>
(Feb 04 2015, 04:34 AM)Dragon Wrote: [ -> ] (Feb 04 2015, 04:32 AM)BlooD ZonE Wrote: [ -> ]Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
didnt know you do programming. >.>
Lol your doing the same steps like nats
, i do by time..
(Feb 04 2015, 04:32 AM)BlooD ZonE Wrote: [ -> ]Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
ayyye thanks Elie! I appreciate the help
(Feb 04 2015, 04:38 AM)BlooD ZonE Wrote: [ -> ] (Feb 04 2015, 04:34 AM)Dragon Wrote: [ -> ] (Feb 04 2015, 04:32 AM)BlooD ZonE Wrote: [ -> ]Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
didnt know you do programming. >.>
Lol your doing the same steps like nats , i do by time..
really? what do u do? student? or already work?
btw nats who?
(Feb 04 2015, 06:13 AM)Dragon Wrote: [ -> ] (Feb 04 2015, 04:38 AM)BlooD ZonE Wrote: [ -> ] (Feb 04 2015, 04:34 AM)Dragon Wrote: [ -> ] (Feb 04 2015, 04:32 AM)BlooD ZonE Wrote: [ -> ]Make a system for X ; Y ; Z to get you this--->
X: Money paid $/€
Y: Hours you get from dealing with your internet provider (h)
Z: Internet speed measurment that you're surfing for the proportionality of its use
By making this system and getting the right number for x , y , z , you have to make Delta for it and divide your x into 2 parts. So calculating the "derivée" of x and Expotatienl primitive of z.
Here you can know how much you're ISP works for C++ on your own surfing rules approx.
didnt know you do programming. >.>
Lol your doing the same steps like nats , i do by time..
really? what do u do? student? or already work?
btw nats who?
Just a simple math question, don't even need a program to do the work.
Keane Wrote:Hire a programmer
way to necro a topic
.kevlar Wrote:An ISP has 3 different subscription packages...
I like how no one posted any code.
Here's something I put together in 15 mins:
Code:
#include <stdio.h>
#include <math.h>
double PackageA(int hours)
{
double cost = 19.95;
// 5-20 hours @ 0.75 extra
cost += fmax(0, (fmin(hours, 20) - 5) * 0.75);
// 20+ hours @ 1.00 extra
cost += fmax(0, (hours - 20) * 1.00);
return cost;
}
double PackageB(int hours)
{
double cost = 24.95;
// 15-25 hours @ 0.75 extra
cost += fmax(0, (fmin(hours, 25) - 15) * 0.75);
// 25+ hours @ 0.50 extra
cost += fmax(0, (hours - 25) * 0.50);
return cost;
}
double PackageC(int hours)
{
return 29.75;
}
int main()
{
// repeat forever!
while (1)
{
printf("How many hours?\n");
int hours;
scanf("%i", &hours);
double A_Total = PackageA(hours);
double B_Total = PackageB(hours);
double C_Total = PackageC(hours);
char package;
double cost;
// repeat until valid package
while(1)
{
printf("What package: A, B, or C?\n");
scanf(" %c", &package);
package = toupper(package);
if (package == 'A')
{
cost = A_Total;
}
else if (package == 'B')
{
cost = B_Total;
}
else if (package == 'C')
{
cost = C_Total;
}
else
{
printf("invalid package...\n");
continue;
}
break;
}
printf("----------------\n");
printf("Package %c; Hours %i; Cost %.2f\n", package, hours, cost);
// determine cheapest package
if (A_Total >= B_Total)
{
if (B_Total >= C_Total)
{
printf("Cheapest Package: C\n");
}
else
{
printf("Cheapest Package: B\n");
}
}
else if (A_Total >= C_Total)
{
printf("Cheapest Package: C\n");
}
else
{
printf("Cheapest Package: A\n");
}
printf("----------------\n");
}
return 0;
}