Search:

Type: Posts; User: Junky

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    2,736

    I don't like it how nobody found this funny....

    I don't like it how nobody found this funny. Where is your sense of humor? :)
    This code isn't working, I'm positive :)
  2. Replies
    20
    Views
    6,106

    I understand now. I was confused, because CTRL-Z...

    I understand now. I was confused, because CTRL-Z gave me "^Z", but I just have to press enter. Tnx
  3. Replies
    20
    Views
    6,106

    Ok, I'm getting really annoying with this, but I...

    Ok, I'm getting really annoying with this, but I want to understand EOF completely.

    #include <stdio.h>

    int main() {
    int c,nl;

    nl = 0;
    while ((c = getchar()) != EOF) if (c...
  4. Replies
    20
    Views
    6,106

    Omg, you're right!! Tnx :)

    Omg, you're right!!
    Tnx :)
  5. Replies
    20
    Views
    6,106

    Windows XP, I'm working on Dev-C++. Thanks, I...

    Windows XP, I'm working on Dev-C++.

    Thanks, I think I understand now what does it actually do. I realized that it prints "Lol\n" 1 time if I just press "Enter", 2 times if I enter 1 character, 3...
  6. Replies
    20
    Views
    6,106

    Tnx, it doesn't work for CTRL D/Z, but it works...

    Tnx, it doesn't work for CTRL D/Z, but it works for CTRL C :)

    One more question, but I don't want to open a new thread. The author said that you can do this:

    #include <stdio.h>

    int main() {...
  7. Replies
    20
    Views
    6,106

    Question about EOF.

    I was reading a book about C programming, and I came across this program example:


    #include <stdio.h>

    int main() {
    int c;

    c = getchar();
    while (c != EOF) {
  8. Replies
    9
    Views
    2,915

    It will work fine without the loop, you just did...

    It will work fine without the loop, you just did something else wrong.
  9. Replies
    2
    Views
    1,423

    Concatenating strings

    I wanted to do a program with concatenating strings 'strcat()', where this function accepts two strings, but the second must be a constant string. This is a problem, because if I need more than 1...
  10. Replies
    9
    Views
    2,915

    Well, yes. The loop should go from the number (x...

    Well, yes. The loop should go from the number (x from x!) down to 1.

    But I don't get why you did this:


    int maxfactorial=0, minfactorial=0, line=0, factorial=0, i=0;

    ...
  11. Thread: Help

    by Junky
    Replies
    8
    Views
    1,220

    I mostly understood what you said, tnx for...

    I mostly understood what you said, tnx for explaining :)

    Do you know if perhaps there is a way to do this correct? Is there a way to get a correct number with digits "abcd" from "0.abcd" (a way to...
  12. Thread: Help

    by Junky
    Replies
    8
    Views
    1,220

    I just saw that if I put x as float instead of...

    I just saw that if I put x as float instead of double (and scanf("%lg",&x) -> scanf("%f",&x)) it works fine.
    But doesn't double have more precision than normal float?

    Tnx for the explanation.
  13. Thread: Help

    by Junky
    Replies
    8
    Views
    1,220

    Ok, sorry, i didn't mean to be rude. I have x =...

    Ok, sorry, i didn't mean to be rude.
    I have x = 0.168, and I multiply it with 1000 (x *= 1000), and I get x = 186, but int(x) = 185.

    But it compiles to me. I don't understand...
  14. Thread: Help

    by Junky
    Replies
    8
    Views
    1,220

    Help

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

    int main(void) {
    double x; int i;
    scanf("%lg",&x);

    for (i = 1; i <= 4; i++) {
    x *= 10;
    printf("x = %lg\n",x);
Results 1 to 14 of 14