Search:

Type: Posts; User: Gart08

Search: Search took 0.01 seconds.

  1. Replies
    24
    Views
    2,511

    Well, its no longer the 'if' statements i need to...

    Well, its no longer the 'if' statements i need to align. In the initial scanf statements, the input is displayed on the screen, whatever the integer the user puts there. That is what I want to be...
  2. Replies
    24
    Views
    2,511

    lmao, it fixed it...explain please? Also, how...

    lmao, it fixed it...explain please? Also, how can i align the input from the user. Like, if i enter 5000 for gallons, and then 5000 for last quarters gallons, how can i have them aligned (right...
  3. Replies
    24
    Views
    2,511

    Ah yes, let me repost what i have. ...

    Ah yes, let me repost what i have.




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

    int main( void )
    {
  4. Replies
    24
    Views
    2,511

    Yes, i removed the .2 however, it has had no...

    Yes, i removed the .2 however, it has had no effect. :(
  5. Replies
    24
    Views
    2,511

    Yea, I put 30.2f in all of the totals. It did...

    Yea, I put 30.2f in all of the totals. It did not align them though.
  6. Replies
    24
    Views
    2,511

    Ok, interesting, adding the if ( gallons != -1 )...

    Ok, interesting, adding the if ( gallons != -1 ) inside the while loop containing all of the other if statements seems to have fixed the problem of the loop coming back to the second line of input...
  7. Replies
    24
    Views
    2,511

    alright, i took away the ".2" did not seem to...

    alright, i took away the ".2" did not seem to have any effect, however I am curious as to why the .2 should have been taken away, Does the compiler automatically recognize a double having two...
  8. Replies
    24
    Views
    2,511

    Yes, i have changed to == in both if statements....

    Yes, i have changed to == in both if statements. Currently I am working on formatting the ouput. I want the cursor to be right aligned when the user enters the initial values. working on that. ...
  9. Replies
    24
    Views
    2,511

    Well, my teacher said it doesnt matter, she told...

    Well, my teacher said it doesnt matter, she told us to use -1 to exit, and because she has not taught us better methods because we have not gotten that far yet in class, that there will be no need to...
  10. Replies
    24
    Views
    2,511

    Well, that is suppose to be the logic, however,...

    Well, that is suppose to be the logic, however, is that not exactly what I have written?
  11. Replies
    24
    Views
    2,511

    Bayint, I've reviewed it now, and I see not...

    Bayint, I've reviewed it now, and I see not problems. I'm quite sure there is something wrong with that statement otherwise you would not have posted that line.

    The logic here seems to me that...
  12. Replies
    24
    Views
    2,511

    Well, it produces almost everything i need. ...

    Well, it produces almost everything i need. Except for after the final input of unpaid balance it doesnt display any of the 'if' statements and it just loops back up to "THANK YOU FOR CHOOSING...
  13. Thread: C Widths help

    by Gart08
    Replies
    6
    Views
    1,270

    ? im not sure what that did. If i have input...

    ? im not sure what that did. If i have input from a user, and i want to display it at lets say, 20 spaces from the left right justified. how is this done? Ive only seend this done in for loops and...
  14. Replies
    24
    Views
    2,511

    So now, i am trying to figure out what is wrong...

    So now, i am trying to figure out what is wrong with my loop. i will post the new code and it will produce strange results.



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

    int main( void )
    {
    ...
  15. Replies
    24
    Views
    2,511

    Excuse me, i got it to compile and run,...

    Excuse me, i got it to compile and run, however...there is no output. it just instantly loops back up after the final input is put in and restarts.
  16. Replies
    24
    Views
    2,511

    Error in my code...not sure what i did wrong

    Ok, so this is just a stupid little program i wrote for class...it will not compile here it is.




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

    int main( void )
    {
  17. Thread: C Widths help

    by Gart08
    Replies
    6
    Views
    1,270

    Oh? Are you speaking of me leaving out the '&'? ...

    Oh? Are you speaking of me leaving out the '&'? I am aware, i was just submitting in a hurry.
  18. Thread: C Widths help

    by Gart08
    Replies
    6
    Views
    1,270

    C Widths help

    Ok, im pretty new but am in a fundamentals course. I need help with widths.


    So, basically i need to read a int from the user and display it in a column...so something like this.

    int...
Results 1 to 18 of 18