Purchase Solution

C++ console program to convert feet + inches to centimeters

Not what you're looking for?

Ask Custom Question

Write a C++ program that prompts the user to enter a length in feet and inches and outputs the equivalent length in centimeters. If the user enters a negative number or a non-digit number, throw and handle an appropriate exception and prompt the user to enter another set of numbers.

Purchase this Solution

Solution Summary

After the welcome message user is prompted to enter length in feet. If we are not able to validate entry an exception is thrown. Exception message is displayed to the user and he is prompted to enter data again. Same thing happens with entry of inches. Then we convert feet and inches to centimeters. The result is displayed.

Solution Preview

Please find attached C++ code (file Main.cpp). The program logic is simple to follow. After the ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Networking Questions

This quiz consists of some basic networking questions.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.