Forum: C Aug 7th, 2009 |
| Replies: 4 Views: 382 Well,It also gives me an error.
syntax error before else
every where when you have else statements coming ahead of else if statements.
May be we can alter the structure of the program , if... |
Forum: C Aug 2nd, 2009 |
| Replies: 25 Views: 962 hmm, let's C:twisted:
void userInput (int matrix[R_SIZE][C_SIZE], int row, int col) //gathering user input
{
/*You are using a for loop in main().This function just accepts input for a... |
Forum: C Jul 29th, 2009 |
| Replies: 5 Views: 353 What if '15' does not exist in the array, what happens then ?
How far will index go ?
or, if there are multiple copies of '15'? |
Forum: C Jul 29th, 2009 |
| Replies: 5 Views: 422 Instead of putting the whole thing in main(), why not make one or two different functions for computing the total salary and gross salary.
const int OVERTIME_MULTIPLE = 1.5;
const int... |
Forum: C Jun 15th, 2009 |
| Replies: 8 Views: 410 If max is the number of primes ,you originally want then why are you looping to maxprimes (or is it MAXPRIMES)
( @siddhant3s :
)
//while (count < maxprimes)
//shouldn't it be
(count <... |
Forum: C Jun 1st, 2009 |
| Replies: 9 Views: 369 The series breaks down to::
1 - 2 / (2 *1) +3 / (3*2!) -....
i.e 1 - 1 + 1/2! - 1/3!
So the first (major) 2 terms of the series cancel out.
Now, may be you define a variable
int sign_carrier =... |
Forum: C Feb 19th, 2009 |
| Replies: 5 Views: 427 First of all,you must pass your array seat[40] to your function
int askFlight(void); .
Else how will the contents of the original array change?Also in the function definition and prototype,
... |
Forum: C Feb 18th, 2009 |
| Replies: 5 Views: 427 You don't loop through your statements to see whether
both the choices work for you
if (choice =2)
If suppose I have booked a ticket,have you placed a 1 in the index position of |
Forum: C Jan 16th, 2009 |
| Replies: 6 Views: 567 1. l x=10;
and left shifting the bits once does not give you 0100
but 10100(ie.20)
2.If you want the output to be converted into a binary format
you can try out something like this:
... |