Help from anyone

Discussion in 'C' started by ubee, Apr 3, 2008.

Thread Status:
Not open for further replies.
  1. ubee

    ubee New Member

    Apr 3, 2008
    Likes Received:
    Trophy Points:
    Pease I need your help on this program.can you give me the solution to this problem because I have been running it over and over without having the correct output.

    Question 1:

    Write a function that takes an integer value and returns the number with its digits

    reversed. Write a function that takes an integer value and returns the number of digits in

    it. Write a main function that inputs a number and calls the above functions.

    Question 2.

    Pupils' heights

    The health visitor at a school is going to measure the heights of all pupils. For each class

    she makes a statistics giving the number of pupils of each height and the average height.

    Make a C++ program that helps the health visitor making the statistics.


    In a class with 20 pupils the heights of the individual pupils, in centimeters, are:

    175, 167, 160, 164, 183, 187, 188, 179, 176, 175, 169, 175, 176, 178, 165, 160, 173, 165,

    187, 178

    The program should read in all the numbers and make a table as follows:

    Height Number of pupils

    160 2

    164 1

    165 2

    167 1

    ... ...

    ... ...

    188 1

    Average height 174.0

    Question 3

    Declare a structure called “Employee” with the following members: Employee name,

    Age, department, designation., and basic salary.

    Write a program to accept the above data from the user at keyboard and store them in a file “College.dat”. You are not informed of the number of employees. After accepting the above data, your program should reads in the employee details from the

    “College.dat” file and display all employees’ data and the total salary paid for all employees.

    I will be very greatfull if my reguest will be perfectly granted.

    Thanks so much.
  2. shabbir

    shabbir Administrator Staff Member

    Jul 12, 2004
    Likes Received:
    Trophy Points:
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice