Search:

Type: Posts; User: drag0n69

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,449

    Searching through a grid of numbers

    Hello:
    Right now say; I have a 12x6 grid full of numbers from 1-999.
    If I want to find a sequence of numbers in this grid that exists in a straight line in the following 8 directions: North, North...
  2. Replies
    4
    Views
    2,796

    How would I do that? Could you maybe show me an...

    How would I do that? Could you maybe show me an example?
    We are currently learning about pointers; does something like this require the use of pointers possibly?
    I am basically taking the sequence...
  3. Replies
    4
    Views
    2,796

    reading a sequence

    Hi:
    What would be the best way to read a sequence of numbers that are separated by white spaces?
    EX: "10 20 30 -1"
    The -1 will be used to mark the end of the sequence.
    I will use the numbers in...
  4. Replies
    29
    Views
    3,534

    Thanks for all the help guys.. But I think I am...

    Thanks for all the help guys.. But I think I am finally going to give up on this problem...
    I mean I solved the overflow problem and made sure the program worked for those range of numbers......
  5. Replies
    29
    Views
    3,534

    Aha. Yes numbers for n and a that are getting to...

    Aha.
    Yes numbers for n and a that are getting to the highest do cause negative answers (which i assume means overflow)...
    I included the extra header; it helped edge the overflow to a larger...
  6. Replies
    29
    Views
    3,534

    N and A (integer, 1

    N and A (integer, 1<=N<=150 & integer, 0<=A<=15)
    Does that help?
  7. Replies
    29
    Views
    3,534

    At first I left the code without the if statement...

    At first I left the code without the if statement at the very end (the one that gets rid of the last \ n) but I got wrong answer as well. Im pretty sure my calculations are all correct. But you don't...
  8. Replies
    29
    Views
    3,534

    yuh well now im just confused... here is my...

    yuh well now im just confused...
    here is my final code that i submitted to the judge and got a "wrong answer" reply to...


    /* CSC1140@ 07611201 74kzYkXl 10523 */
    #include <stdio.h>

    int...
  9. Replies
    29
    Views
    3,534

    Nevermind. I found my own error! I had to add...

    Nevermind. I found my own error!
    I had to add "int argc, char* argv[]" and "return 0;" to my code for it to compile with no warnings.
    Thanks guys for all the help!!!
  10. Replies
    29
    Views
    3,534

    Aha. What a stupid mistake sorry about that. Hey...

    Aha. What a stupid mistake sorry about that.
    Hey now I finally got the program working 100&#37;.


    #include <stdio.h>

    int main()
    {
    int n,a;
    int calc,sum,x,i,final_a;
  11. Replies
    29
    Views
    3,534

    #include int main() { int n,a;...

    #include <stdio.h>


    int main()
    {
    int n,a;
    int calc,sum,x,i,final_a;
    while(scanf("&#37;d %d",&n,&a) == 2)
    {
    sum=0;
  12. Replies
    29
    Views
    3,534

    Ahh I see. That works! Thanks so much. Now my...

    Ahh I see. That works! Thanks so much.
    Now my values are screwed up though. Like when I try to ech out x,i,final_a or any variable; they are all really high messed up values; maybe memory addresses?
  13. Replies
    29
    Views
    3,534

    I also tried to print out: scanf("%d %d",&n,&a)...

    I also tried to print out:
    scanf("&#37;d %d",&n,&a)
    and I got *
  14. Replies
    29
    Views
    3,534

    If I use that; I get no output at all..

    If I use that; I get no output at all..
  15. Replies
    29
    Views
    3,534

    So how would I correct the problem? Should I...

    So how would I correct the problem?
    Should I click the input first for n,a first? But then I couldn't loop the input and I wouldn't know where to stop...
    Any help would be greatly appreciated!
  16. Replies
    29
    Views
    3,534

    tabstop: how would I correct this type of...

    tabstop:
    how would I correct this type of program? should I use getchar() instead of scanf() for the n,a variables as well?
  17. Replies
    29
    Views
    3,534

    Thanks for the help! So after reading all the...

    Thanks for the help!
    So after reading all the replies I got something like this:


    #include <stdio.h>

    int main()
    {
    int c,n,a,calc,sum=0,x,i,final_a;
    while((c = getchar()) != EOF)
  18. Replies
    29
    Views
    3,534

    Wrong variable value assigned

    Hello:
    I am trying to make an application which takes input of sets of 2 numbers and does a mathematical equation with them and displays the answer for each set.
    However; I have been testing and...
  19. Replies
    6
    Views
    2,013

    Thanks for the help guys. However; so I am going...

    Thanks for the help guys.
    However; so I am going to assume the input is from a text file... then what would the loop for the input look like? Would I use a "do-while" loop or another one? I am...
  20. Replies
    6
    Views
    2,013

    ACM Problem Confusion

    Hello:
    I am attempting at this Online Judge problem:
    http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1464

    The...
  21. Replies
    10
    Views
    11,913

    Hmm... now I am really confused. Because I am...

    Hmm... now I am really confused. Because I am maybe thinking about this problem way harder then it is. I am thinking about using pointer, dynamic arrays, and such...
    Basically I understand I can...
  22. Replies
    10
    Views
    11,913

    So how does the code tell the input has ended? is...

    So how does the code tell the input has ended? is this based on scanf() inputs or file based inputs.
    The exact words the problem says is: "For each line of the input, your correct program should...
  23. Replies
    10
    Views
    11,913

    Thanks for the clearification. I have not...

    Thanks for the clearification.
    I have not learned about buffers yet. What topic would they be under? (So i can read about them in my textbook.)
    In your sample code; you have a comment saying parse...
  24. Replies
    10
    Views
    11,913

    Thanks for your reply; but what does that code...

    Thanks for your reply;
    but what does that code exactly do? The thing is I do not know if it will be EXACTLY 2 lines of input or not. If I knew it would be exactly a number of inputs; then it would...
  25. Replies
    5
    Views
    1,475

    Thanks for the long explanation! I really...

    Thanks for the long explanation! I really appreciate your help.
    I have a few questions concerning what you said about calling functions; taking the function return variable and recalling the...
Results 1 to 25 of 35
Page 1 of 2 1 2