Search:

Type: Posts; User: mako

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    45,002

    (number=2;number

    (number=2;number<=300;number++)
    for (i=2; i <number; i++)
    (number%i == 0)

    if you start with number on 2, and with i on 2. Then it should be obvious that number%i is 0...

    and you don't need...
  2. Thread: advanced typecast

    by mako
    Replies
    5
    Views
    1,395

    *lol*

    *lol*
  3. Replies
    3
    Views
    1,025

    thanks for the info!

    thanks for the info!
  4. Replies
    3
    Views
    1,969

    sorry if YOU can see this topic twice, I for one...

    sorry if YOU can see this topic twice, I for one can't find it in the c forum, I can't find the other one either, nor on recent posts... very odd.

    I looked in there and found zip, but I was kinda...
  5. Replies
    3
    Views
    1,969

    opening/processing zip files

    could somebody please point in the right direction on how to open/process a .zip file in c?
  6. Replies
    3
    Views
    1,025

    opening and using zip files

    Could one of you point me in the direction of a good tutorial? I've searched this site and google just spat crap in my face too, many thanks.
    ~mako
  7. replace yuor scanf with gets(s); ...

    replace yuor scanf with

    gets(s);
    strcat(s, " ");
  8. practise some more. Think up yuor own examples,...

    practise some more. Think up yuor own examples, like converting numbers between bases, write a calculator, think about getting towards writing a simple game..... oh and make up your own goddamned...
  9. Replies
    5
    Views
    16,073

    thx. As for getch being defined in conio, I can...

    thx. As for getch being defined in conio, I can call it just by #include ing stdio....
  10. Replies
    5
    Views
    16,073

    getch() vs. getchar()

    I was wondering, what the difference between these two functions is. I looked through the FAQ and couldn't find an explanation. I gather both read from stdin, so what's the difference?..

    Greetz,
    ...
  11. Thread: Looping Issue

    by mako
    Replies
    5
    Views
    1,524

    first off, does IRC script support the c...

    first off, does IRC script support the c programming language?

    Which ort are you trying to send the strings to?

    What do you know about the default send routine?.,,
  12. isdigit tests for digits obviouslt, alnum does...

    isdigit tests for digits obviouslt, alnum does both in one, and both functions are in ctype.h
  13. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    my point is that the application inputs text from...

    my point is that the application inputs text from a user. I've tried both cases, /n and text/n and it works for both. There's no way a user can input a pointer, so I don't see any need to adapt my...
  14. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    i enter text, how can buffer be a pointer?.. ...

    i enter text, how can buffer be a pointer?..

    As for the whole "it doing the same thing" issue, yuo are of course correct. I actually copied similar code from the faq and there it had a different...
  15. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    fgets(buffer, 20, stdin);...

    fgets(buffer, 20, stdin);
    if(strlen(buffer)==(sizeof(buffer)-1)) buffer[strlen(buffer)-1]='\0';
    else buffer[strlen(buffer)-1]='\0';
    strcpy(aktuell->name, buffer);

    seems to work. o.O anybody...
  16. Thread: Maths problem

    by mako
    Replies
    3
    Views
    1,013

    if they're both int values and a=5 and b=2 then...

    if they're both int values and a=5 and b=2 then a%b=1
  17. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    thx, just what I needed :) as for the '\n'...

    thx, just what I needed :)

    as for the '\n' issue, I'm working on it, but I think I know what I need to do :)
  18. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    If I scanf("%d", int_var_name);, it only...

    If I scanf("%d", int_var_name);, it only continues when I actually enter something. It doesn't if I just hit enter... How can I overcome this?..

    as for fgets being better than gets, apart from the...
  19. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    I assume you get that output while still using...

    I assume you get that output while still using the fflush(stdin); As for MS-compiler, I'm using mingw which implements gcc. gcc is not ms. Does that mean mingw have added this functionality?..
    ...
  20. Thread: fflush(stdin)

    by mako
    Replies
    23
    Views
    8,023

    fflush(stdin)

    okay. I know this function is wrong, but I have an example where the code doesn't exectute as it should when I leave it out. I'm afraid the code is commented in german, sa are the variables.
    ...
  21. Replies
    7
    Views
    2,018

    atoi(hex_holding_string,Int_to_b_stored_in, 10);...

    atoi(hex_holding_string,Int_to_b_stored_in, 10); /* converts whatever ehxadec (or other value) is stored in the string into a base 10 value. You could justaswell change it to bae 2*.
  22. Replies
    8
    Views
    2,123

    to justify the name loll but your right, it was...

    to justify the name loll but your right, it was lame ,)
  23. Replies
    8
    Views
    2,123

    #include int main(void) { FILE *fp;...

    #include <stdio.h>
    int main(void)
    {
    FILE *fp; //filepointer
    while(1)
    {
    fp = fopen("overkill.txt","a");
    fputs("1", fp) //replace 1 with some long text of your choice...
    fclose(fp);...
  24. or you could replace the do while counter

    or you could replace the do while counter<12 with:



    //int try2;

    for(counter=2; counter<=12; counter++)
    {
  25. scanf("%d",&answer); //say we enter 2 ...

    scanf("%d",&answer); //say we enter 2
    correctans=num*counter; //but the correctanswer is 1
    {
    if (correctans==answer) // 1 != 2 so answer is FALSE
    {...
Results 1 to 25 of 75
Page 1 of 3 1 2 3