Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does anyone know how to do this c++ problem
#11
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.
#12
(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. >.>
[Image: mrpa43.png]
#13
(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
#14
(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
#15
(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
#16
(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
#17
(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?
[Image: mrpa43.png]
#18
Hire a programmer Smile
#19
(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.
[Image: Photo%20collage-climate%20scenarios-glob...k=rcowMNf5]
#20
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;
}
Steam Wrote: 4:02 PM - George, of the jungle: was out
4:02 PM - George, of the jungle: bison, dude
4:02 PM - Brawl Bashin’ Bison: ???
4:02 PM - George, of the jungle: you're very rude towards alina
4:02 PM - George, of the jungle: how about unbanning her friend?
4:02 PM - George, of the jungle: I mean
4:02 PM - George, of the jungle: it's only gamebanana skins
4:02 PM - Brawl Bashin’ Bison: LOL
4:02 PM - George, of the jungle: ^^
4:02 PM - Brawl Bashin’ Bison: LOLOL
4:02 PM - George, of the jungle: lol

Users browsing this thread: 5 Guest(s)