Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
request for freebasic.
#1
make 6 multiplied by 9 equal 42. ythe only math exception i ask, cuz its special
earn.
Reply
#2
and if it needs to be used?

have this equal 42
Code:
six=1+5
nine=8+1
PRINT six*nine
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#3
Reply
#4
Anyways.......
.
.
It is from the book =P
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#5
Quote: It is from the book =P

Psh. The 'from the book' example is always in C code. It's the law.

#include <stdio.h>

#define SIX 1 + 5
#define NINE 8 + 1

int main(void)
{
printf( "What you get if you multiply six by nine: %d\n", SIX * NINE );
return 0;
}
Reply
#6
i dont understand... what does that proggie do?
earn.
Reply
#7
It's makes 42 out of "SIX" and "NINE". SIX and NINE are macros. Here is how it would look without macros:

Code:
#include <stdio.h>

int main(void)
{
  printf( "What you get if you multiply six by nine: %d\n", 1 + 5 * 8 + 1 );
  return 0;
}

5 * 8 + 2 is 42. :wink:
Reply
#8
Or you could just do all your math in Base 13
his sig left intentionally blank
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)