Search:

Type: Posts; User: richfatsanta

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    1,206

    Maybe you could try and deal with the file one...

    Maybe you could try and deal with the file one line at a time? Then approach your two tasks (uppercasing and averaging) separately.



    while not end of file
    {
    get 3 words and 3 numbers
    ...
  2. Replies
    2
    Views
    2,057

    Try looking up the functions rand() and srand(),...

    Try looking up the functions rand() and srand(), as well as the use of the % mathematical operation.
  3. Replies
    5
    Views
    1,675

    It means the function is not included in the c...

    It means the function is not included in the c headers that you are ummm including. Or you didn't define the function at the beginning of your code. Or you spelled it wrong. Lets just see the code.
  4. Replies
    13
    Views
    1,628

    From my experience there are two ways to do that....

    From my experience there are two ways to do that. You can use globally declared variables or pointers.

    Globally declared variables will be recognized by all functions so you don't have to worry...
  5. JFonsenka, The FIRST code you posted is almost...

    JFonsenka,

    The FIRST code you posted is almost right, you only have the order of a few elements around your while loop mixed up.

    When you kept on getting the same answer no matter the input,...
  6. Replies
    20
    Views
    6,097

    Weird that exact code works perfect on my...

    Weird that exact code works perfect on my machine.
    For input of a,b,c you are using values that actually make a real triangle and separated by spaces? Though even enter each time works on mine. ...
  7. Replies
    20
    Views
    6,097

    I don't know if you are trying the program just...

    I don't know if you are trying the program just to practice your functions and such but either way...



    float a,b,c,s,area;

    scanf("%f %f %f",&a,&b,&c);

    s=(a+b+c)/2;
  8. Thread: getchar()

    by richfatsanta
    Replies
    7
    Views
    2,620

    Hey thanks for the quick help I just had to run...

    Hey thanks for the quick help I just had to run off for a moment. Ummm I'm tired and will take a more in depth look at fget later. Ugh I wish i hadn't put this off to the last minute. I'll either...
  9. Thread: getchar()

    by richfatsanta
    Replies
    7
    Views
    2,620

    getchar()

    Hi. My school assignment is to write a program to help someone learn their time tables. It works as expected however when trying to replace a system("pause") at the end of the program with a...
Results 1 to 9 of 9