Thread: Help for my assignment!

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    3

    Help for my assignment!

    Develop a program to meet the following requirements:

    1. Must use at least two functions, not including Main

    2. Must use indirection (the * operator)

    3. Must use a loop

    4. Must use an array to hold the integers

    5. Must take the integer inputs from a file

    Your assignment is to take ten integers as input from a file, store them in an array and then:


    1. output the largest



    1. calculate the average value of all ten integers, output as float



    1. output the contents of your array of integers in order, first to last

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Do you have a question ?
    Kurt

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    yes. my question is how do i take numbers from users and store them as files?

  4. #4
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Your assignement tells you have to read the input from a file.
    Kurt

  5. #5
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by 110abbidi View Post
    yes. my question is how do i take numbers from users and store them as files?
    You must take the input by the file,not by user! you have to use functions that manipulate files! fopen,fread,fwrite,fclose etc.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You need to make an actual effort.

    Announcements - General Programming Boards

    You can't just run from tutor to forum, copy/paste your assignment and then expect us to do all the work for you.

    Write some code, show us that you're making an effort.
    It also shows us what you know already, what you need to improve on, and what you're stuck on.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help with assignment C++
    By extractor in forum C++ Programming
    Replies: 8
    Last Post: 05-29-2011, 04:10 AM
  2. Replies: 3
    Last Post: 04-26-2009, 08:54 AM
  3. Need help with an assignment
    By Phantom Driver in forum C++ Programming
    Replies: 3
    Last Post: 09-08-2005, 01:21 PM
  4. help on assignment
    By robasc in forum C Programming
    Replies: 12
    Last Post: 07-08-2005, 05:37 AM
  5. Assignment
    By cYou in forum C++ Programming
    Replies: 4
    Last Post: 06-12-2003, 07:57 AM