C++ Challenges


This is a list of the challenges of the past and present. Future challenges will not be posted.


#5 Dairy cow mix up - vandalism at the dairy farm.

The vandals have struck again at the dairy farm, this time they�ve taken the nameplates off of the cows stalls, and strewn them about on the floor. Even worse, the individual letters on the nameplates have been reversed so now �bessie� is �eisseb�. The farmer is distraught! Write a program to reverse the names and put them in the right order.. Fortunately for you, the cows stalls are ordered alphabetically, so the correct order is alphabetical.

Input (from standard input):

Number of cows, followed by cow names(reversed).

Ex.

3

eisseB

ybbA

neeloC

Output:

The cow names in alphabetical order and un-reversed.

Ex.

Abby

Bessie

Coleen

Name the program "cowsattack1".


#4 Construct a program that asks the user a set of questions and there is only one right answer. (i.e. mulitple choice program like a quiz)


#3 Construct a program counts down from a specified number to 0. For example, if the user types in 10 seconds, it should count down, 9...8...7...6...etc.


#2 Construct a program that tells if the driver of a car is driving too fast. If the driver is going greater than or equal to 75 mph, the program should tell the driver that he is driving too fast. If the driver is driving less than 75 mph, the program should tell the driver that he is driving safely.


#1 Construct a program that asks the user for his first name, last name,a nd his age. Then make the program write the user's name and age back to the user.

Hosted by www.Geocities.ws

1