Wednesday, 26 June 2013

String manipulation functions-very worth

                       string manipulation functions


#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

int main ()
{
 string firstWord, secondWord, thirdWord, fourthWord, fifthWord;

 cout << "Enter a five-word phrase." << endl;
 cin >> firstWord >> secondWord >> thirdWord >> fourthWord >> fifthWord;

 cout << "Your first word is: " << firstWord << endl
  << "Your second word is: " << secondWord << endl
  << "Your third word is: " << thirdWord << endl
  << "Your fourth word is: " << fourthWord << endl
  << "Your fifth word is: " <<fifthWord << endl;

 return 0;
}




No comments:

Post a Comment