Posted by: Sourav | August 3, 2012

A simple test with c++


#include<iostream>
using namespace std;
int main(){
    string name,present,city,yourname;
    int age;
    cout<<“Enter a name: “;
    getline(cin,name);
    cout<<“Enter the present they bought: “;
    getline(cin,present);
     cout<<“Enter the city they are from: “;
     getline(cin,city);
    cout<<“Enter your name: “;
    getline(cin,yourname);
    cout<<“Enter your age: “;
    cin>>age;
    cout<<“Dear “<<name<<“,”<<endl<<endl;
    cout<<“Thank you for the “<<present<<“.I really like it,I can not believe I’m already “<<age<<” years old. “
    <<“But it doesn’t feel that much different than being “<<age-1<<“. I hope we will visit “<<city<<” as soon as possible.”
    <<endl<<endl<<“Sincerely “<<yourname<<“.” <<endl;
    
    
}

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

Categories

%d bloggers like this: