Unit 01 Test - UNIT01TEST 1.WriteaC application.:...

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

View Full Document Right Arrow Icon
1. Write a C++ application that will run on your computer as a standalone  application. The program should print out:  ME 205 follows the Personalized  System of Instruction . #include <iostream> using namespace std; int main (void) { cout << "ME 205 follows the Personalized System of Instruction." << endl; return 1; } 2. Write a C++ application in which you define 3 constants A, B and C to be  4.0, 3.0 and PI respectively. Then output "THE VOLUME OF A UNIT SPHERE IS  (4.0/3.0)*pi WHICH IS EQUAL TO ans", where ans is the result of a  computation in your program. Please add a comment of your choice at the  beginning of the program. What happens if you use 4 and 3 instead of 4.0 and  3.0 for the defined constants? // Name: Faras Ali Momin #include <iostream> #define A 4.0 #define B 3.0 #define C 3.141592654 using namespace std; int main (void)
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 note was uploaded on 10/02/2011 for the course ME 205 taught by Professor Koen during the Spring '07 term at University of Texas.

Page1 / 3

Unit 01 Test - UNIT01TEST 1.WriteaC application.:...

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