User Profile

Collapse

Profile Sidebar

Collapse
Sleepwalker817
Sleepwalker817
Last Activity: Apr 30 '08, 03:53 AM
Joined: Mar 12 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sleepwalker817
    started a topic c program help - functions
    in C

    c program help - functions

    Hello, I need some help with the program included below.


    Code:
    174 lines of code removed - please read the posting guidelines about posting only the RELEVANT section of code
    I need to alter this program so that it uses at least three "non-trivial" functions (non-trivial meaning that it does more than just print a line of text). My problem is that the text book I am using isn't very helpful so any...
    See more | Go to post

  • Sleepwalker817
    started a topic c program help
    in C

    c program help

    Hello, I am trying to create a program that is supposed to calculate and print the average of several grades entered by the user.

    The output is supposed to look something like this:
    ----------------------------------------------------------------------
    This program calculates the average of as many grades you wish to enter.



    First, enter the number of grades to process: 4

    ...
    See more | Go to post

  • Sleepwalker817
    replied to c program help
    in C
    Many thanks for all the help you guys have given me.
    See more | Go to post

    Leave a comment:


  • Sleepwalker817
    replied to c program help
    in C
    For some reason Dev-C++ is displaying the average part of the program, so I can't tell if it is working properly. Can you tell me if what I have is correct or what I have to fix? Thanks.

    Code:
    #include<stdio.h>
    #include<conio.h>
    int main()
    {
     int km, i;
     float res, lt, sum, avg;
    
     printf("Welcome to the Sears kilometers per liter calculator.\n\n");
    ...
    See more | Go to post

    Leave a comment:


  • Sleepwalker817
    replied to c program help
    in C
    Thank you for your help

    Code:
    Full code removed
    Can you help me with the average?
    See more | Go to post
    Last edited by sicarie; Mar 14 '08, 01:05 AM. Reason: Posting Guidelines

    Leave a comment:


  • Sleepwalker817
    started a topic c program help
    in C

    c program help

    Hello,
    I need some help with a c program that is supposed to determine the kilometers per liter for 4 tanks of gasoline that a user fills in his/her car.

    Here is what I have so far:
    [code=c]
    for(i=1;i<=4;i+ +)
    {
    printf("/n/nEnter the number of kilometer for tank %d#: ",i);
    scanf("%d", &km);
    printf("Enter the number of liters used by tank %d#: ",i);...
    See more | Go to post
    Last edited by sicarie; Mar 14 '08, 01:05 AM. Reason: Code tags
No activity results to display
Show More
Working...