Example2_17 - cin >> firstName >> lastName;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <string> # using namespace std; u int main() { string firstName; //Line 1 string lastName; //Line 2 int age; //Line 3 double weight; //Line 4 cout << "Enter first name, last name, age, " << "and weight, separated by spaces." << endl; //Line 5
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin >> firstName >> lastName; //Line 6 cin >> age >> weight; //Line 7 cout << "Name: " << firstName << " " << lastName << endl; //Line 8 cout << "Age: " << age << endl; //Line 9 cout << "Weight: " << weight << endl; //Line 10 return 0; //Line 11 }...
View Full Document

This note was uploaded on 03/08/2011 for the course CSIT 139 taught by Professor Duzut during the Spring '11 term at Los Angeles City College.

Ask a homework question - tutors are online