ah, ok. that makes sense, thanks.
Type: Posts; User: Muster Mark
ah, ok. that makes sense, thanks.
What you are trying to do is fairly straight-forward, if I understand the problem properly. To change a 1 into a 0 at position n, we simply take num1^(1<<n) (note: using XOR like this will change a...
Hi all,
So, in general, freeing a linked list is pretty straight forward. my freeing function looks like this:
typedef struct node
{
uint64_t digit;
struct node *next;
struct node...
Thank you!! I knew I was being thick! I was just stuck with the idea that the test part of the standard loop structure had to actually be the test.
Thanks again.
I know the answer must be NO!!!, but I can't think of a direct way of doing this.
BEGIN LOOP
loop statements;
.
.
.
TEST(test_condition)
update statements;
Hey, thanks for the response. What you say makes sense. So, I guess there is no easy way to convert, for example, 2^(2^32) into base ten, at least not an obvious one. I will have to tackle it as...
So, I know how to convert between bases, but I was wondering how the computer implements base conversion for I/O (I assume this is done by the OS?).
I can think that for relatively small numbers...
I might go for a "do while" loop myself.
ex:
#include <stdio.h>
int main()
{
char answer;
printf( "Play Game? (Y/N): " );
scanf( " %c", &answer );
if (answer == 'Y' )
Thanks so much! putting (unsigned long long int) in front of Primes[Test] worked wonderfully! And, best of all, I only melted one computer in verifying this:devil:(fortunately, not a valuable one).
I am very new myself, but I think I can give you some help. I am merely learning from a book, but perhaps my knowledge is useful.
There are very many errors in your code. The first thing I...
I'm glad your problem has been solved, but I couldn't help but point this out. You mean kilo/ounce and gram/ounce rather than what you have. The constants are correct for what you are doing with...
Why would Num be overflowing, given that it's maximum value is so large compared to the numbers it could be?
Thanks for the prompt reply!
Overflow sounds pretty likely now that you mention it. But it still doesn't really make sense, because which variable could be overflowing? Regardless, I will now...
Hello everyone,
My Background: I am a novice C programmer. I simply bought a book* and am trying to teach my self out of general interest in computer science.
My Trouble: As an exercise, I...