[omfg] a / b = 4,000,000,000

Code:
#include <iostream>
using namespace std;
int main () 
{

   for(b = .5; b < 4000000000 ; b = b + .5)
   {
       a = 4000000000 / b;
       cout << "A is:" <<a<< " B is:" <<b<<;
   }
return 0;
}

That will give every possible answer with a .5 incrament up to 4,000,000,000

What do i win?
 
Code:
#include <iostream>
using namespace std;
int main () 
{

   for(b = .5; b < 4000000000 ; b = b + .5)
   {
       a = 4000000000 / b;
       cout << "A is:" <<a<< " B is:" <<b<<;
   }
return 0;
}

That will give every possible answer with a .5 incrament up to 4,000,000,000

What do i win?

Not every possible answer though...


I award you with the Perfect Prime Silver Medal of Mediocrity.
 
Code:
#include <iostream>
using namespace std;
int main () 
{
   long double a;
   long double b;
   for(b = .000001; b < 4000000000 ; b = b + 000001)
   {
       a = 4000000000 / b;
       cout << "A is:" <<a<< " B is:" <<b<<;
   }
return 0;
}

Hows that? better.... i even declared the variables this time *coff* *coff*
 
Code:
#include <iostream>
using namespace std;
int main () 
{
   long double a;
   long double b;
   for(b = .000001; b < 4000000000 ; b = b + 000001)
   {
       a = 4000000000 / b;
       cout << "A is:" <<a<< " B is:" <<b<<;
   }
return 0;
}

Hows that? better.... i even declared the variables this time *coff* *coff*


This will return a finite number of answers



FAILURE
 
well it's hypothetically impossible to produce a list of EVERY possibly number, because of time constraints. I don't know C, but hypothetically you could throw something along the lines of this in there

Code:
#include <iostream>
using namespace std;
int main () 

{
X = 0.1

   for(b = X; b < 4000000000 ; b = b + X)
   {
       a = 4000000000 / b;
       cout << "A is:" <<a<< " B is:" <<b<<;
   }
return 0;
Else {
X = X/10;
}
return 0;
}

what i'm trying to say is it'll keep going back and running through the list over and over and smaller increments, so the first time it'll be at a .1 increment, second time .01, then .001, etc... as i said, i don't know how to code in C, so i jsut guessed at the commands and formatting.
 
do it in every .25 increment and the keep condensing.


isn't there a P=nrt or something like that for calculating continuous interest. I haven't had shitty math in awhile.

Calc 2 babyy. and I should know this, being that we are discussing series atm.
 
Code:
#include <iostream>
using namespace std;
int main () 
{
    int a = 1;
    int b = 1;
    int i = 1;
    while(i > 0)
    {
       cout << a+b;
       a = a+b;
       b = a*b;
     }
   return 0;
}
There infinite answers.
It wont stop
 
Back
Top