Lab2 - EAS230: Programming for Engineers Lab 2 Fall 2011...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EAS230: Programming for Engineers Lab 2 Fall 2011 Lab2: Problem Solving Using C++ in JGrasp Objective The objective of this lab is to solve a small engineering problem using C++. We will focus on these issues: Understand the requirements of a problem and the solution algorithm Implement the solution using C++ in JGrasp - Define real number (non-integer) variables. - Take user input - Output results to the screen Debug and remove errors Test and verify the correctness of the results Description For this lab, you will calculate the area of a shaded geometric shape Preparation UNDERSTAND LAB 1 please. Enter AND UNDERSTAND this code. Use any filename that you like. This part will not be submitted. This short program should give you an example of the steps you will need in the area calculation. When you understand every line of this code, move on to the Area calculation. #include <iostream> using namespace std; int main() { double x; int y; char dummy; cout << "Enter a real number: " ; cin >> x; cout << x << endl; cout <<
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/03/2011 for the course EAS 230 at SUNY Buffalo.

Page1 / 2

Lab2 - EAS230: Programming for Engineers Lab 2 Fall 2011...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online