Search:

Type: Posts; User: seanksg

Search: Search took 0.01 seconds.

  1. Replies
    16
    Views
    10,935

    You made one suggestion to me (line 14 of my...

    You made one suggestion to me (line 14 of my code), which I implemented. I then started to write my reply to you. After I posted the reply, I saw anduril's comment, and edited my reply, saying that...
  2. Replies
    16
    Views
    10,935

    I actually read your first comment after changing...

    I actually read your first comment after changing my code based on only Tater's first suggestion. I will check back when I get time to add in the rest of the suggestions.
  3. Replies
    16
    Views
    10,935

    I implemented that, but it doesn't seem to be...

    I implemented that, but it doesn't seem to be going any faster.

    Evaluating the same number (600851475143) with a program that only determines whether it's prime returns a result instantly.

    So...
  4. Replies
    16
    Views
    10,935

    Largest Prime Factor

    Hi all,

    I'm currently working on a Project Euler challenge calling for me to find the largest prime factor of a given number. I have a working code written (I know it works, as I've tested it...
  5. Thread: Dice Roll

    by seanksg
    Replies
    4
    Views
    2,560

    Ah I see. I just did upon your suggestion, but...

    Ah I see. I just did upon your suggestion, but had only read what my textbook said before. I think I'm going to stray from this text from now on... at least when it is instructing me in how to use...
  6. Thread: Dice Roll

    by seanksg
    Replies
    4
    Views
    2,560

    Nope, just two. I guess you and I both saw the...

    Nope, just two. I guess you and I both saw the "==" error at the same time. Andwhy rand()? Won't that produce the same value every time?
    Also, thanks for the FAQ suggestion... I was following an...
  7. Thread: Dice Roll

    by seanksg
    Replies
    4
    Views
    2,560

    Dice Roll

    Hi,

    I'm trying to write a simple program to roll a die. So far, here is what I have:



    #include <stdio.h>
    #include <math.h>
    #include <time.h>
    #include <stdlib.h>
  8. Replies
    11
    Views
    16,815

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <limits.h>
    #include <ctype.h>
    #include <string.h>

    #define TRUE 1
    #define FALSE 0

    int pal(char *input);
  9. Replies
    11
    Views
    16,815

    Ah that makes more sense. Thanks! I'll try that...

    Ah that makes more sense. Thanks! I'll try that out.
  10. Replies
    11
    Views
    16,815

    My roommate just suggested that to me. It seems...

    My roommate just suggested that to me. It seems to make the most sense. I'm assuming I'd use something like strcpy(). But how would i keep from copying the unwanted characters?
  11. Replies
    11
    Views
    16,815

    That's correct

    That's correct
  12. Replies
    11
    Views
    16,815

    Ignoring specific characters in a string

    Hi,

    So I am writing a program that checks to see whether a string input by the user is a palindrome or not. Part of the problem involves ignoring any character that isn't a letter when verifying...
  13. Replies
    11
    Views
    2,273

    Duly noted... I'll spend some more time on the...

    Duly noted... I'll spend some more time on the faqs and see if I can't decipher them a bit more.



    Just read this post... I put the getchar() into my code. So I'm led to believe that my problem...
  14. Replies
    11
    Views
    2,273

    I honestly agree. I was very upset having learned...

    I honestly agree. I was very upset having learned that my prof gave me code that doesn't work. Saying that I would just stick to my professor for help was a frustrated response. I do want to learn...
  15. Replies
    11
    Views
    2,273

    To both quzah and commontater, thank you for the...

    To both quzah and commontater, thank you for the help,

    quzah, i wasn't ignoring you. the faqs you pointed me to were informative, but this is a class assignment, and the faqs suggested commands...
  16. Replies
    11
    Views
    2,273

    I can't tell if you're being sarcastic. The...

    I can't tell if you're being sarcastic. The internet kind of prevents that. But if you are. Why? I'm new to C programming, and am just trying to learn... no need to be a dick.

    If not, sorry...
  17. Replies
    11
    Views
    2,273

    I removed the fflush(stdin). It now allows me to...

    I removed the fflush(stdin). It now allows me to enter a "y" or an "n", but when I press enter afterwards, it terminates the program, rather than restarting the loop. Is it because of using the...
  18. Replies
    11
    Views
    2,273

    While Loop Not Reinstating

    Hi all,

    I recently started writing a program that generates a random number, then gives the user four chances to guess the number. Upon either a correct guess, or upon using all four chances, the...
  19. Replies
    10
    Views
    23,922

    Issue with "double" argument type

    Hi all,

    I'm just learning C, and I started playing around with the double argument type. So I wrote a simple print/scan/print program to see how it works. My code is below.



    #include...
  20. Replies
    8
    Views
    2,085

    Brilliant! It's all working now. Thanks for...

    Brilliant!

    It's all working now. Thanks for all the help! I can't thank you enough.
  21. Replies
    8
    Views
    2,085

    I looked into else...if statements (next section...

    I looked into else...if statements (next section in my book)... and developed the following code. However, I'm still having some issues.



    #include <stdio.h>
    #include <stdlib.h>
    #include...
  22. Replies
    8
    Views
    2,085

    Thanks for the help! My roommate tried to...

    Thanks for the help! My roommate tried to explain nesting to me (he's far more versed in programming than I, but doesn't know C). We just couldn't figure out off the bat how to do that. I'll try...
  23. Replies
    8
    Views
    2,085

    Correct... still only in week 2 of classes. I...

    Correct... still only in week 2 of classes. I figure that we will probably go over something to that effect sometime this week (assignment isn't due until next week). I just figured I'd be...
  24. Replies
    8
    Views
    2,085

    Possible Logic Error

    Hi all,

    I'm new to these boards, and programming in general. In fact, C is my first language. Earlier today, my instructor gave an assignment that called for a program that, upon the input of 4...
Results 1 to 24 of 24