Search:

Type: Posts; User: kal123456

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    14,069

    OMG......I JUST DID IT!!!! IT PRINTS OUT THE...

    OMG......I JUST DID IT!!!! IT PRINTS OUT THE CORRECT FORMAT!!!!!!! AHH I"M EXTREMELY HAPPY RIGHT NOW OMG. Okey, now I have to work on the loops for checking if the input is correct or not. I will...
  2. Replies
    6
    Views
    14,069

    Ohh, okey, I undestand how to check if the input...

    Ohh, okey, I undestand how to check if the input is correct or not now, thank you!!
    I wrote some fast code just now, but without checking if the input is correct. I plainly enter a number, for...
  3. Replies
    6
    Views
    14,069

    Parsing a Phone number-strings

    Hey everyone,
    I'm stuck on a relatively easy homework:

    "Write a program to parse user’s input of a telephone number. Your program should accept a string in any of the following format:


    ...
  4. Replies
    3
    Views
    2,166

    trying to print a 2D array..HELPP

    Hey everyone,

    so I have a very simple program here, and somehow I can't get it to print out a two-dimensional array. Any ideas on what I might be doing wrong?

    here's my code:


    #include...
  5. Hey!! I JUST FIXED MY PROBLEMS AND I"M DONE WITH...

    Hey!! I JUST FIXED MY PROBLEMS AND I"M DONE WITH THE HOMEWORK!! Matticus you were right, I didnt print the total_sales[i] to my output file!! and I fixed the part about comp too, so now everything...
  6. NEVERMIND ACTUALLY, I FOUND MY ERROR, SO NOW I...

    NEVERMIND ACTUALLY, I FOUND MY ERROR, SO NOW I CAN PRINT THE TOTAL/PERSON.
    the only LASTT problem is that I cant print the Total Sales for each week!! I print it fine in my calcSales function, the...
  7. Ok guys, I'm back, I knew it -_____- soooo, just...

    Ok guys, I'm back, I knew it -_____- soooo, just now I realized that when I calculated the total amount of sales each person had for all 4 weeks, the amount should have been stored in a one...
  8. OMG.....YOU GUYS ARE SERIOUSLY AMAZING!!! it...

    OMG.....YOU GUYS ARE SERIOUSLY AMAZING!!! it would take me half a day to realize that I was passing in the wrong array!! DUHH of course it would print me 0.0000 cause there are no values in the...
  9. Oh, yes, my assignment requires us to make a...

    Oh, yes, my assignment requires us to make a function that prints all the data out to the screen, I just thought I would work on that later when I got all the data to print in the separate...
  10. 2Dimensional Arrays-find lowest, largest, and total of each column HELP!!!!

    Hey everyone!
    So i posted about this assignment earlier, but i had a completely different problem, so I decided to make a new thread!

    So, here is the assignment:



    Project: Sales Tables
    ...
  11. I JUST DID THAT AND IT WORKED!!! thanks so much!!...

    I JUST DID THAT AND IT WORKED!!! thanks so much!! :)
  12. so would i do something like this? int...

    so would i do something like this?


    int num_rows = namesArray[0][0];


    since the first row and column of the array is 16 in this case? the teachers doesnt really want us to output the number...
  13. @AndiPersti Thanks, I actually got my program to...

    @AndiPersti Thanks, I actually got my program to print the table correctly! the only problem is that now I want the first element of the array not to be read...for example, the names.txt file looks...
  14. Ohh ok, that makes sense that i would rather use...

    Ohh ok, that makes sense that i would rather use what I already defined then creating new integers, thanks! and I fixed up my code, I made the getSales function look exactly like the getNames...
  15. Ok, i'll indent it right now! and in the...

    Ok, i'll indent it right now!
    and in the getSales function, i wrote:

    int col=6;
    int row=25;


    so i made the max number of columns be 6, and the mas number of rows 25. I also defined...
  16. I'm really sorry that I'm speeding through this,...

    I'm really sorry that I'm speeding through this, but it's due by today midnight, and I'm just really nervous -___- Thanks for clearing the fgetc thing out! I'm using that in my code now, so the...
  17. Oh, and also, I'm not allowed to use strings when...

    Oh, and also, I'm not allowed to use strings when I read the names....Im supposed to read in one character at a time...
  18. @Matticus -- Yes, i just read the link!! I tried...

    @Matticus -- Yes, i just read the link!! I tried doing what it said in the link, but my code got all messed up, so I'm trying to see if nonpuz's way will work....I'm so confused!!

    @nonpuz -- I...
  19. no it doesnt!! i had to add what @camel-man...

    no it doesnt!! i had to add what @camel-man suggested,
    if(namesArray[i][j]==',') printf("\n");

    However, now it outputs a slightly different output, the commas are misarranged!! it looks like...
  20. ya im on a windows machine and here's my code: ...

    ya im on a windows machine and here's my code:



    #include <stdio.h>

    #define INPUT_FILE_GET_NAMES "names.txt"
    #define INPUT_FILE_GET_SALES "sales.txt"
    #define MAX_ROWS_NAMES 25
    #define...
  21. OMG.........it actually works!!!! only now, the...

    OMG.........it actually works!!!! only now, the last problem, how do I get it to look exactly like the txt file? like this:



    16
    Kelly, Victor
    Lam, Gary
    Nagasake, David ...
  22. Ohh ok, so I changed the %d to %c which means...

    Ohh ok, so I changed the %d to %c which means that now it should be printing characters instead of integers. However, now it doesn't output anything, just a blank space haha.....what do you mean by...
  23. Ohhh, so then how do i change it to read...

    Ohhh, so then how do i change it to read characters?
  24. ok now i get it to print something, but instead...

    ok now i get it to print something, but instead of printing out the contents of the txt file, it just prints:


    0000000000000000000000000
    Process returned 0 (0x0) execution time : 0.055 s...
  25. Ohh ok! I don't think I'm gonna make one function...

    Ohh ok! I don't think I'm gonna make one function do the same 2 things, cause my teacher prefers us to write 2 separate functions, but thanks for letting me know, i'll use it in the future! so I just...
Results 1 to 25 of 55
Page 1 of 3 1 2 3