SHARE
TWEET

Untitled

a guest Dec 14th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # include <iostream>
  2. # include <string>
  3.  
  4.  
  5. using namespace std ;
  6. string knowname () ;
  7. string knowaddress () ;
  8. string addcontacts () ;
  9. string removecontacts () ;
  10. int main ()
  11. {
  12.     cout << " create a contact " << addcontacts() << endl;
  13.     removecontacts () ;
  14.  
  15.  
  16.  
  17.  
  18.  
  19. }
  20.  
  21. string knowname ()
  22. {
  23.     string firstname, lastname, finalname ;
  24.     cout << " enter first name " << endl;
  25.     cin >> firstname ;
  26.     cout << " enter last name " << endl;
  27.     cin >> lastname,
  28.         finalname= firstname + " " + lastname ;
  29.     return finalname ;
  30. }
  31.  
  32. string knowaddress ()
  33. {
  34.     int addressnumber ;
  35.     string streetname , finalinformation ;
  36.     cout << " enter the street name " << endl;
  37.     cin >> streetname ;
  38.     cout << " enter address number " << endl;
  39.     cin >> addressnumber ;
  40.     finalinformation = addressnumber + " " + streetname ;
  41.     return finalinformation ;
  42. }
  43.  
  44. string addcontacts ()
  45. {
  46.     string fullname, personaddress ;
  47.     int dateofbirthyear , dateofbirthmonth, dateofbirthday ;
  48.     long phonenumber ;
  49.     fullname = knowname () ;
  50.     personaddress = knowaddress () ;
  51.     cout << " enter the year " << endl;
  52.     cin >> dateofbirthyear ;
  53.     cout << " enter the month " << endl;
  54.     cin >> dateofbirthmonth ;
  55.     cout << " enter the day " << endl;
  56.     cin >> dateofbirthday ;
  57.     cout << " enter phone number " << endl;
  58.     cin >> phonenumber ;
  59.     cout<< " name = " << fullname << endl;
  60.     cout << " address = " <<personaddress << endl;
  61.     cout << " date of birth = " << dateofbirthyear<< " / " << dateofbirthmonth << " / " << dateofbirthday << endl;
  62.     cout << " phone number = " << phonenumber << endl;
  63.     return 0 ;
  64. }
  65.  
  66. string removecontacts ()
  67. {
  68.     cout << " remove the contacts " << endl;
  69.     return 0 ; }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top