C++ Primer Plus Chapter 2 Exercise 1

c plus plusI’ll kick things off by posting my version of the programming exercise solutions for the popular book, C++ Primer Plus 5th edition.  All source code for the exercises in this series will be my own. Feel free to reference it or use it for your own purposes. The programming exercises start at chapter 2, so off we go with exercise 1 of chapter 2:

1. Write a C++ program that displays your name and address.

#include <iostream>

using namespace std;

int main()
 {
 cout << "Rundata\n";
 cout << "Bourbon Street\n";
 cout << "New Orleans, LA 70116\n";
 return 0;
 }

Easy enough huh?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s