Friday, January 9, 2009

Console App

Today is going to be a review day...

Your goal is write a console application that computes the perimeter length and area of regular polygons. Here's the pseudocode:
  • iostream, cmath, namespace std
  • Declare variables
  • Start loop
  • Prompt user for how many sides for the polygon
  • Prompt user for length per side
  • Calculate perimeter
  • Calculate area using equation (on chalkboard)
  • Output perimeter & area
  • Prompt user to do more polygons
Make sure that your program can properly handle ALL possible user inputs, including negative lengths, non-numeric entries, nonsensical values... And correct the entries.

Upload your main.cpp file when you're done...


.

No comments: