Forum: C Apr 15th, 2007 |
| Replies: 5 Views: 1,627 with some code or description of what you've attempted |
Forum: C Feb 2nd, 2007 |
| Replies: 5 Views: 986 for the original problems, the answers should be 20 and 256. Since it's a loop, it'll repeat until the condition is false (i.e. until a>12 and a>25 respectively). |
Forum: C Dec 13th, 2006 |
| Replies: 1 Views: 791 Wikipedia (http://en.wikipedia.org/wiki/Dijkstra%27s_shortest_path)
Look around some... the internet has lots of information readily available ;) |
Forum: C Sep 18th, 2006 |
| Replies: 4 Views: 2,002 floating point numbers always have a degree of imprecision. A floating point value will never be equal to a whole number. You should check to see if it is within an acceptable epsilon from a whole... |
Forum: C Sep 18th, 2006 |
| Replies: 4 Views: 1,443 Your code probably shouldn't compile. add(int, int) is specified to return an int, but doesn't, which should raise a compile time error. |
Forum: C Sep 16th, 2006 |
| Replies: 7 Views: 8,902 We will help newbies who show some effort, through code or otherwise. We will not write code for newbies. We will not do research for newbies. And, as Grunt pointed out, if you really are a... |
Forum: C Sep 14th, 2006 |
| Replies: 2 Views: 970 basically, you should put code segments between and tags. It looks like this:
Your code will be in here
and formatting will be preserved
so we can all read it If you want to point out a... |
Forum: C Sep 13th, 2006 |
| Replies: 4 Views: 1,424 ~a flips the bits in a, but doesn't save the result anywhere. On the next line, a is still equal to 0xffff. 0x marks that the value is written in hexadecimal (simlarly, a number preceded by a 0,... |
Forum: C Sep 12th, 2006 |
| Replies: 6 Views: 1,212 #include<stdio.h>
int main() // main's return type is int
{
/* ... */
b= m%2; // I'm assuming you mean n%2
while( b!= 0) // this will check if n is even or odd. if it's even, the loop will be... |