Welcome! Please Login or Sign Up.

Help with My C++ Class

Discussion in 'Technology Forum' started by mark sheriff, Jul 23, 2010.


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

    Joined:
    Sep 4, 2008
    Posts:
    351
    Likes:
    1,245
    Trophy Points:
    71
    okay im taking a c++ class and i have no idea what im doing. i need help writign out the code for some simple program my teacher wants us to do, i have work dues last week that i dint even turn in yet, i dont know where to begin, if someone knows about c++ and can help, i would appreciate it alot, this is the work he wants us to do :


    WEEK ONE:

    2.Write the following programs:
    1.Program 2.1 – Write a program that converts years into days and displays both values. At this point, you do not need to worry about fractional years and leap years.

    2.Program 2.2 – Write a program that prompts for an ASCII value, such as 66, and prints the corresponding character.

    3.Program 2.3 – There are 2.54 centimeters in 1 inch. Write a program that first prompts for a length in feet and inches and displays the corresponding length in centimeters. The program will then prompt for a length in centimeters and displaying the corresponding length in feet and inches.

    4.Program 2.4 – Write a program that will prompt for the first and last names of five students and their integer scores. The program will print the names and scores in a table with neatly formatted columns. After printing the table, program will print high score, low score, and mathematical average.

    5.Program 2.5 – Write a program that prompts for the number of miles driven and the number of gallons of fuel consumed. 1 gallon is approximately 3.785 liters and 1 mile is about 1.609 kilometers. The program should display computed the fuel economy as MPG, to the nearest tenth of a mile, and the liters-per-100-km, to the nearest tenth of a liter.



    WEEK TWO:

    2.Write the following program:
    1.Program 3.1 – Write a program that prompts for an ASCII value, such as 66. If the value is a non-printable character, the program should print out the hexadecimal value and a message that the value is is non-printable. Otherwise the program should print the corresponding character.

    2.Program 3.2 – Write a program that requests number of hours worked in a week. The hours must be non-negative and less than half the total number of hours in a week. The program should compute and display the gross pay, the taxes, and the net pay. Assume the following:

    Basic pay is $15.45 per hour.

    Overtime is paid any time worked over 40 hours at a rate of time and a half.

    Tax rate is 15% of first $450, 20% of next $175, and 25% of the rest.

    You should use constants for all static values. Do not worry if the tax rates do not confirm with current law.

    3.Program 3.3 – Write a program which uses switch statement to convert a numeric score between 0 and 100 into a letter grade. The following scale will be used: 90 and above is an A, 80's is a B, 70's is a C, 60's is a D, 59 and below is an F.

    4.Program 3.4 – Write a program which uses the rand() function to generate a pseudorandom number between 1 and 10. Using a loop, the program should prompt the user for the value until the correct number is entered. The program should display the number of attempts the user made to guess the value.

    5.Program 3.5 – Write a program using nested loops to print neatly formatted 10 by 10 multiplication table. The first row and column should display the numbers that are being multiplied.
     
    mark sheriff, Jul 23, 2010


    #1
  2. Member

    Joined:
    Dec 26, 2008
    Posts:
    276
    Likes:
    203
    Trophy Points:
    31
    thats simple stuff, however programming is a B.ITCH lol. i think Aj knows a good bit of programming, hit him up on aim i doubt you'll find him around mastahpiece much.
     
  3. Newbie

    Joined:
    Sep 12, 2009
    Posts:
    2
    Likes:
    0
    Trophy Points:
    3
    i'll give you the solution tonight or tomorrow....depending on how much i drink this afternoon
     
  4. Classified

    Joined:
    May 23, 2007
    Posts:
    744
    Likes:
    16,060
    Trophy Points:
    421
    shoot my homie 'rookie' a private message on here, he does programming.
     
  5. Member

    Joined:
    Sep 4, 2008
    Posts:
    351
    Likes:
    1,245
    Trophy Points:
    71

    ii thanks man, can u get all done?


    k ill hit him up too juss incase topshotta cnt get it done

    thanks guys

    SOLUTIONS HAVE TO BE IN A C++ SOURCE CODE FILE
     
    Last edited: Jul 26, 2010
Thread Status:
Not open for further replies.

Share This Page