Skip to content

Commit

Permalink
Update ex6_42.cpp
Browse files Browse the repository at this point in the history
Alignment
  • Loading branch information
pezy committed Oct 30, 2014
1 parent 1f71ce8 commit 64dd6ee
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions ch06/ex6_42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
//! argument of 's'. Test your program by printing singular and plural
//! versions of the words success and failure.


#include <iostream>
#include <string>
#include <vector>
#include <iterator>

using namespace std;
using std::string; using std::cout; using std::endl;


string make_plural(size_t ctr, const string &word, const string &ending = "s")
Expand All @@ -21,13 +18,8 @@ string make_plural(size_t ctr, const string &word, const string &ending = "s")

int main()
{
cout<<"singual: " << make_plural(1, "success")
<<" "
<<make_plural(1,"failure")
<<endl;
cout<<"plural : " << make_plural(2, "success")
<<" "
<<make_plural(2, "failure")
<<endl;

cout<<"singual: " << make_plural(1, "success") << " "
<< make_plural(1, "failure") << endl;
cout<<"plural : " << make_plural(2, "success") << " "
<< make_plural(2, "failure") << endl;
}

0 comments on commit 64dd6ee

Please sign in to comment.