Search:

Type: Posts; User: Northstar

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    2,093

    Here is what I have now, can anyone help me with...

    Here is what I have now, can anyone help me with inputting the text file?



    #include <stdio.h>
    #include <stdlib.h>

    #define NUMBER_OF_CIRCUITS 5

    typedef struct{
  2. Replies
    19
    Views
    2,093

    Oh, I see what you mean I think. Like this?: ...

    Oh, I see what you mean I think.

    Like this?:


    fprintf(outputFile, "&#37;f -- Reliability %c\n", circuits[n].name);
    fprintf(outputFile, "%f -- Cost %c\n", circuits[n].name);
  3. Replies
    19
    Views
    2,093

    Whoops, forgot about the for loop, I had that...

    Whoops, forgot about the for loop, I had that correct at the lab and then when the file did not save correctly I forgot to put it back in. I don't really understand what I am doing wrong? The TA...
  4. Replies
    19
    Views
    2,093

    Ok, this is what I think I had before (it as at...

    Ok, this is what I think I had before (it as at least pretty close, could be a couple things wrong/different):



    #include <stdio.h>
    #include <stdlib.h>

    #define NUMBER_OF_CIRCUITS 5
    ...
  5. Replies
    19
    Views
    2,093

    Crap! I didn't even look at the code before I...

    Crap! I didn't even look at the code before I opened it, just copy and pasted it from what I had done at the lab, and this is not it! I guess it didn't save correctly or something. Ugh! I will try to...
  6. Replies
    19
    Views
    2,093

    Do you mean that the cost of the circuit and the...

    Do you mean that the cost of the circuit and the reliability are fixed? There is another part of the project where I have to take different circuits with different reliabilities and figure out which...
  7. Replies
    19
    Views
    2,093

    I see, thanks for the help. When I go to...

    I see, thanks for the help. When I go to integrate the cost into the circuit, is this done in a similar way?
  8. Replies
    19
    Views
    2,093

    Is there anything wrong with using the enum or is...

    Is there anything wrong with using the enum or is that totally unnecessary? How does it know that A = 0, B =1, etc. without the enum?
  9. Replies
    19
    Views
    2,093

    Why is the struct outside of int main? Also,...

    Why is the struct outside of int main? Also, don't I need that enum to use my input file? Eventually, I am going to have to do some economics and figure out the best way to do things in terms of the...
  10. Replies
    19
    Views
    2,093

    Need help on this program!

    Ok, so I have to calculate the reliability of the circuit below (sorry, the picture is somewhat crude). It doesn't really matter if you look at it that much because it is explained below:
    ...
  11. Replies
    1
    Views
    2,235

    Circuit Reliability program

    I have this project about circuit reliability that I am quite confused about.

    Sorry for the poor picture, but I'm not the greatest of photoshop artists. Here is the circuit:
    ...
  12. Replies
    4
    Views
    978

    I wanted someone to explain how to do these. I'm...

    I wanted someone to explain how to do these. I'm not very good with pointers or arrays and we haven't gone over them for more than an hour or so each, so I'm rather confused. These aren't homework...
  13. Replies
    4
    Views
    978

    Help with pointers

    I need some help understanding pointers. Two problems that my TA suggested were these:

    Arrays A and B each contain 10 integers. Write a function that checks if every element of array A is equal...
  14. Replies
    9
    Views
    1,392

    So the first program is as simply as just: ...

    So the first program is as simply as just:


    void remove_null(char* str)
    {
    str[strlen(str) - 1] = '\0'; /* Removes last character in array before NULL */
    }

    ?
  15. Replies
    5
    Views
    1,906

    Nevermind, I figured out how to do it. Thanks.

    Nevermind, I figured out how to do it. Thanks.
  16. Replies
    9
    Views
    1,392

    Need some help with strings

    My Professor said I should look over a couple problems in the book so that I could gain some understanding of strings. We have just briefly touched on them, and we don't have to write any program...
  17. Replies
    5
    Views
    1,906

    I should have been more specific in my first...

    I should have been more specific in my first post. The program needs to have a year entered and then print out the calendar, and then ask the user if they want to continue.

    So basically it should...
  18. Replies
    5
    Views
    1,906

    How do I combine these two programs?

    I need to make a program to make a calendar for any given year. I have a program that will say what day any date in time fell on, and a program that will print out something that looks like a...
  19. Yes! That was the problem! Thanks for all of your...

    Yes! That was the problem! Thanks for all of your guys' help.
  20. Ah, duh! Ok, but now apparently there is...

    Ah, duh!

    Ok, but now apparently there is another problem...

    I entered 3, 3, 2. It said that the sum was 8 (correct), the product was 18 (correct), num count was 3 (correct), invsum was 1.167...
  21. I recompiled it with num as a doubles, and for...

    I recompiled it with num as a doubles, and for some reason it always thinks the product is 1 now, anyone have any ideas? It also thinks sum and num are the same thing (sum = num, instead of equaling...
  22. Can't figure out why this program won't work

    This program is supposed to calculate the average, geometric mean, and harmonic mean of n number of numbers.


    #include <stdio.h>
    #include <math.h>

    int main()
    {

    double average,...
  23. Replies
    8
    Views
    1,379

    Is it? My compiler does not like getchar and so...

    Is it? My compiler does not like getchar and so it never shows me what the program actually comes up with, but I did the program in the lab and it just added them all together at once. I think adding...
  24. Replies
    8
    Views
    1,379

    Oh, whoops, I was very unclear. "I want to change...

    Oh, whoops, I was very unclear. "I want to change it so that it calculates after every number is entered." <-- That was supposed to mean that I want it to calculate after each new number is entered....
  25. Replies
    8
    Views
    1,379

    I need it to calculate the new number after each...

    I need it to calculate the new number after each number is entered instead of after all the numbers are entered. I think I figured it out though, by adding brackets around while and sum.
Results 1 to 25 of 34
Page 1 of 2 1 2