Search:

Type: Posts; User: x2x3i5x

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    11,587

    is this what you're looking for? I used the...

    is this what you're looking for?

    I used the following formula in my program and with my code, it shows a monthly payment of 332.14 given the 10000.00 amount like your sample output wants.


    ...
  2. Replies
    3
    Views
    943

    you can use for loop or while loop or do/while...

    you can use for loop or while loop or do/while loop. Any will be fine. Read in your book how to use those and then write the code for it. Shouldn't be difficult.
  3. ok, I tested when I change the SIZE to 1, no...

    ok, I tested when I change the SIZE to 1, no error. But when I have 2 or more, I get an error.

    when I have SIZE as 1, I can get something like the following as output (click on links to see the...
  4. @hk_mp5kpdw, I'm supposed to have the program...

    @hk_mp5kpdw, I'm supposed to have the program print out all of the stock data for each stock and the order printed out will be in alphabetical order on the name. So, what would I have to do in that...
  5. thank you for the fflush(stdin) tip. And ok,...

    thank you for the fflush(stdin) tip. And ok, I'll check the thing you highlighted, I guess fprint is printing out the word "purchase" to textfile and fgets is reading that same word out of the...
  6. I believe the error lies in the following...

    I believe the error lies in the following statements in my code: fgets(s[j].purchase_date, sizeof(s[j].purchase_date),f); and printf("\nPurchase Date: %s\n", s[j].purchase_date);


    But it looks ok...
  7. need help with writing to text file / reading from text file

    Hi,

    I have an array of structures allowing user to enter info on 5 stocks. I have calculated initial cost, current cost, and profit. I have also bubble sorted the array of structures...
  8. Replies
    6
    Views
    1,253

    Ok, made a revision on the code. I realized I...

    Ok, made a revision on the code. I realized I wanted stock name in [j] is to be saved in t before we check the next stock name, which is in [j+1] against the stock name in [j]. t is there just in...
  9. Replies
    6
    Views
    1,253

    why the "-i"? I had done the bubblesort with...

    why the "-i"? I had done the bubblesort with regular integers and n-1 was all I needed to get the proper number of times the sorting will be done to get all the values properly sorted.
  10. Replies
    6
    Views
    1,253

    Helo with bubblesort?

    Hi,

    I have written a structure of 5 stocks allowing user to enter info on 5 stocks, the code below is the function I have attempted to write a function using bubblesort to sort the stock names...
  11. Replies
    5
    Views
    1,143

    I don't think it a problem, if you use the stuff...

    I don't think it a problem, if you use the stuff correctly.
  12. Replies
    5
    Views
    6,155

    but my teacher just said to use fflush(stdin);...

    but my teacher just said to use fflush(stdin); when you are needing to enter in characters after you have just entered in numbers to clear the buffer.

    for example,



    #include<stdio.h>
    ...
  13. Replies
    5
    Views
    1,143

    Thank you very much, a simple error that I did...

    Thank you very much, a simple error that I did not catch. :)
  14. Replies
    5
    Views
    1,143

    Am I doing something wrong?

    Hi,

    I've learned structures in class, and I tried out an example given by the teacher. I'm using MS Visual Studio C++ 2008 express. I think I have the code he gave written correctly.

    Here's...
  15. Replies
    11
    Views
    2,257

    I realized that the *profit return is just junk,...

    I realized that the *profit return is just junk, but how else to fix the problem? Maybe profit is not the right variable to have the result returned back.
  16. Replies
    11
    Views
    2,257

    ok, but the return statement function?

    ok, but the return statement function?
  17. Replies
    11
    Views
    2,257

    Bo sorry, haven't learned on arrays except for...

    Bo sorry, haven't learned on arrays except for the char arrays, so a way to go for it?
  18. Replies
    11
    Views
    2,257

    Here's my entire program code. Return statement...

    Here's my entire program code. Return statement basically feeds out a value to the main from the function so that main can use it. I attempted doing return *profit, but obviously that's just a wasted...
  19. Replies
    11
    Views
    2,257

    I haven't learned structures in class yet,...

    I haven't learned structures in class yet, therefore can't use it. Though as far as I understand from my book, structures make great for writing code to make databases.

    But what can I do? Still...
  20. Replies
    11
    Views
    2,257

    return statement

    Hi,

    Need little help on my homework assignment. Let's say I have the information on three stocks which include stock name, buying price, current price, number of shares bought and and yearly...
  21. Replies
    6
    Views
    6,263

    Ok thank you.

    Ok thank you.
  22. Replies
    6
    Views
    6,263

    Why would that help? What is the difference?

    Why would that help? What is the difference?
  23. Replies
    6
    Views
    6,263

    how to check if text file is blank

    Hi,

    I have written a program that counts number of words in a text file as shown below.



    #include "stdafx.h"
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
  24. Replies
    2
    Views
    2,173

    sorry for late reply, but thanks! it works the...

    sorry for late reply, but thanks! it works the way iwanted.
  25. Replies
    8
    Views
    2,035

    another thing .... x=6 is often mistaken with...

    another thing ....

    x=6 is often mistaken with x ==6.

    x = 6 means, make x equal 6.

    x == 6 means, "Is x equal to 6?"
Results 1 to 25 of 44
Page 1 of 2 1 2