(wL) Forums

Full Version: Does anyone know how to do this c++ problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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 Tongue , i do by time.. Tongue
(Feb 03 2015, 01:27 AM)IEatPau Wrote: [ -> ]No idea what c++ is just doing this with basic maths cause im bored.
a) $35 for 25 hrs not including additional
b) $44.70 for 40 hours not inc additional
c) Get C
Sorry i couldnt help Big Grin

haha its cool man
(Feb 03 2015, 04:58 AM)Dragon Wrote: [ -> ]Let number of hours be x;
let monthly charge be y;
make a switch case for the choices
then according to the pick calculate the monthly charge
if else loops would be used here
compare the x with the given number of hours in choice like
if(x<=5) elseif(5<x<21)
like this you can calculate the monthly charge.
hope i helped
i might be wrong though Big Grin

thanks for effort! Smile
(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 Smile
(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 Tongue , i do by time.. Tongue
really? what do u do? student? or already work?
btw nats who?
Hire a programmer Smile
(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 Tongue , i do by time.. Tongue
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 Smile
way to necro a topic Dodgy

.kevlar Wrote:An ISP has 3 different subscription packages...
I like how no one posted any code. Tongue

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; }
Pages: 1 2 3