Search:

Type: Posts; User: alexpos

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    870

    Passing pointer to character to function

    My code has the following:

    - a function with the prototype: "void mat_out(double a[][10], int m, int n, char * title);"
    -within my main function i have "mat_out(inv, m, n, "Inverse");"
    -within...
  2. ROW OPERATIONS (finding Inverse) (im going crazy)

    I developed an algorithm to calculate the solution to equations by augmenting a matrix of coefficients with an identity matrix and then finding the inverse. So:

    [A | I ] ---> [I | A-1 ]
    ...
  3. Replies
    2
    Views
    3,878

    Okay.. Yet i still don't understand how...

    Okay..

    Yet i still don't understand how "variable values are passed from one function to another".


    Anyways, i understand this task in the following fashion. I replace all the main parts of...
  4. Replies
    2
    Views
    3,878

    User defined functions

    I am instructed to do the following:



    However, I'm not sure what the assignment means. Firstly, is "passed" supposed to be "past"?

    Also, what does it mean to "return a possibly modified...
  5. Replies
    2
    Views
    1,818

    Please find an error in my noob program

    The code works on another system, but when run on another computer (and possible an older compiler), the program either runs in an infinite loop or does not recognize the redirected input file.
    ...
  6. Replies
    7
    Views
    1,536

    Another question, what does "modular fashion"...

    Another question, what does "modular fashion" mean in regards to a written code?
  7. Replies
    7
    Views
    1,536

    I seem to have fixed it: #include ...

    I seem to have fixed it:

    #include <stdio.h>

    int main()
    {

    int prod_num, number, counter=0, major_code=0, minor_code=0, tax_code=0, manuf_code=0;
    double base_cost, minor_factor=0,...
  8. Replies
    7
    Views
    1,536

    The code does seem to read the input text...

    The code does seem to read the input text correctly now.
    However, the calculated total price is wrong. Actually, it's a completely random huge number. Any ideas?

    I was told that i must...
  9. Replies
    7
    Views
    1,536

    Improper Scanning of Redirected Input

    The following code reads a file containing (on each line): Code, Price, Amount. Then it calculates taxes, shipping costs, etc. and consequently, the grand total of each purchase (or each line). At...
  10. Replies
    2
    Views
    1,120

    Evaluating differ. parts of a single #.

    Suppose i have an 8 digit code. I want to assign first 'x' digits to represent the first code. The 'y' digits after x i want to represent a different code. And so on.

    So for a specified number. I...
  11. Replies
    17
    Views
    11,536

    Problem fixed!.

    Problem fixed!.
  12. Replies
    17
    Views
    11,536

    Problem fixed!.

    Problem fixed!.
  13. Replies
    17
    Views
    11,536

    Thank you for the replies. When the following...

    Thank you for the replies.

    When the following code is outputted, the total hours and the gross pay appear as huge numbers.

    For example, this is the code:


    #include <stdio.h>

    int...
  14. Replies
    17
    Views
    11,536

    What does it mean to equate scanf statements to a...

    What does it mean to equate scanf statements to a value.


    if ( scanf("%lf", &num_hours) == 1)

    and


    while ( scanf("%d %d %lf", &emp_num, &num_shifts, &base_rate) == 3 )
  15. Replies
    17
    Views
    11,536

    I really appreciate it everyone (especially...

    I really appreciate it everyone (especially Dave), but i want to try to write with my own method. Your program Dave, believe it or not, is confusing for me, since i only know the very beginnings.
    ...
  16. Replies
    17
    Views
    11,536

    There is no need for me to use the 'file open'...

    There is no need for me to use the 'file open' commands. I can just use my compiler's option to input data from a file. That's no longer a problem.

    The problem comes in when i'm told to read a...
  17. Replies
    17
    Views
    11,536

    Also, can someone please explain the following...

    Also, can someone please explain the following code to me (in particular, the bolded parts):


    #include <stdio.h>

    int main() {
    FILE *file;
    int numbers[30] ;
    /* make sure it is large...
  18. Replies
    17
    Views
    11,536

    .....

    The following code, Ancient Dragon, will give me an error "access Violation".


    #include <stdio.h>
    int main()
    {
    int emp_num, num_shifts;
    double base_rate, num_hours;

    FILE* fp =...
  19. Replies
    17
    Views
    11,536

    Very simple loop program for payroll

    I have to write a program which processes data from a file (employee number, number of shifts, base wage, and the number of hours worked), and then calculate several things and consequently print...
Results 1 to 19 of 20