Search:

Type: Posts; User: dev123

Search: Search took 0.00 seconds.

  1. Replies
    27
    Views
    19,015

    That's a good way of doing it. How to deal with...

    That's a good way of doing it. How to deal with default using only if statements?
  2. Replies
    27
    Views
    19,015

    Thanks all for your help. I am learning C on my...

    Thanks all for your help. I am learning C on my own, still on the loop control chapters and I'm using Code Block with mingw as compiler.

    I have added this line to deal with space and newline:

    ...
  3. Replies
    27
    Views
    19,015

    Replacing switch statement with a nested if/else

    I have to replace the switch statement with a nested if/else of this program:



    #include <stdio.h>

    int main()
    {
    int grade;
    int aCount = 0, bCount = 0, cCount = 0,
  4. Thanks for your reply to both. To Cogman: Is...

    Thanks for your reply to both.

    To Cogman:
    Is there a way to round an integer value? For example, round the number 13456 to a four digits which will give 1346.

    To New Ink
    Henry, your logic is...
  5. Replies
    10
    Views
    1,299

    Code::Blocks with mingw. It has a GUI interface,...

    Code::Blocks with mingw. It has a GUI interface, use GNU GCC Compiler and free.

    Code::Blocks
  6. Using integer variables instead of double to calculate compound interest

    The exercise:

    Modify the program in Fig. 4.6 so that it uses only integers to calculate the compound interest. (Hint: Treat all monetary amounts as integral numbers of pennies. Then "break" the...
  7. Ok, thanks for the tip qwertylurker and dwks.

    Ok, thanks for the tip qwertylurker and dwks.
  8. Return five first digits out of a random number

    How can I get the first 5 digits in a random length integer?

    For example: users input 1234567, 123456789, 1012345671

    I should get 12345, 12345, 10123 respectively.
    The number input by an user...
Results 1 to 8 of 8