Write My Paper Button

WhatsApp Widget

University of Central Oklahoma Language Programming Project

Share this post on:

University of Central Oklahoma Language Programming Project – Description

I’m working on a c++ question and need the explanation and answer to help me learn. (NO LOOPS in the programs please) Visual Studio  

1. Write a program that reads 3 numbers and prints “all the same” if they are all the same, “all different” or “neither”, otherwise. 

2. Write a program that reads the number of degrees away from North (the angle) of a compass needle and prints the direction (N, NE, E, SE, S, SW, W, NW). in case of a tie between pick the nearest principal direction (N, S, E, W). 

3. Write a unit conversion program that asks which unit to convert from (fl. ox, gal, oz, lb, in, ft, mi) and which unit to convert to (ml, l, g, kg, mm, cm, m, km). Reject incompatible conversions such as gal to km. Also ask for value to be converted and display answer.

4. Ask the user to provide a single alphabetic character. Print Vowel or Consonant depending on the input. If the u not a letter (between a and z or A and Z) or is a string of length > 1, print an error.

5. Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, and F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by .3 while a – decreases it by .3. An A+ has a value of 4.0.

6. Write a program that takes user input describing a playing card with the following shorthand:

A = Ace

2…10  card values

J = Jack

Q = Queen, etc.

D = Diamonds

S = Spades. etc.

Ex. if the user enters QS then your program responds with Queen of Spades

I’m working on a c++ question and need the explanation and answer to help me learn. (USE LOOPS if needed in the programs please) Visual Studio

7. Write a program to read a sequence of integer inputs and print:

a.       The largest and smallest of the inputs

b.      The number of even and odd inputs

c.       Cumulative totals. For example, if the input is 1 7 2 9, the program should print 1 8 10 19

d.      All adjacent duplicates. For example, if the input is 1 3 3 4 5 5 6 6 2, then the program should print 3 5 6

8. Write a program to read a set of floating-point numbers. Ask the user to enter the values, then print:

·         The average of the values

·         The largest and smallest

·         The range (the difference between the smallest and largest values)

9. Write a program to read a word and print each character of the word on a separate line. For example, entry of “Harry” should result in:

H

a

r

r

y

10. Write a program to read a sequence of words and print them in a box with each word centered, like:

+- – – – – – – -+

|    Hello     |

|      C++      |

+ – – – – – – – -+

11. Write a program that prompts the user to enter an integer and then prints out all prime numbers up to that integer. Ex. User enters 20, printout is 2 3 5 7 11 13 17 19

12. Write a program that asks the user to type today’s exchange rate between U.S. Dollars and Japanese Yen, then reads U.S. dollar values and convers tot yen. Use 0 as a sentinel.

13. Write an application to pre-sell a limited number of cinema tickets. Each buyer can buy as many as 4 tickets. No more than 100 tickets can be sold. Implement a program called ticket_seller that prompts the user of desired number of tickets and then displays the remaining tickets. Repeat until all tickets are sold and the display the number of buyers.

The post University of Central Oklahoma Language Programming Project first appeared on .

Share this post on:

Affordable and Dependable Platform for Your Academic Assignments

X