Advertisement
lhaziri

friendship

Nov 15th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.98 KB | None | 0 0
  1. /**
  2.  ** Einführung in Algorithmen und Datenstrukturen
  3.  ** Vorlage für ein Konsolenprogramm
  4.  **
  5.  ** <Beschreibung>
  6.  **
  7.  ** <Autoren>
  8.  **/
  9.  
  10. #include <iostream>     // Importiere die Standard Ein- und Ausgabe
  11. #include <string>           // Importiere die String Klasse
  12.  
  13. using namespace std;  // Verwende den Standard Namensraum std
  14.  
  15. //========================================================================
  16.  
  17. int main(){
  18.  
  19.     //Variablen
  20.     int y, zaehl;
  21.     string res,hot,n,interest, answ;
  22.     int drinks;
  23.     char i;
  24.  
  25.  
  26.     cout << "Place phone call." <<endl;                                   //place phone call
  27.     cout << "Home?(yes or no)";                                           //home?
  28.     cin >> n;
  29.     if (n=="yes") {                                                       // Falls ja, dann
  30.         cout << "Would you like to share a meal?" <<endl;
  31.     }
  32.     if(n== "no"){                                                         // Falls nein, dann
  33.         cout << "Leave message." <<endl;
  34.         cout << "Wait for callback." <<endl;
  35.         cout << "Would you like to share a meal?" <<endl;
  36.     }
  37.         cout << "What is the response(yes or no):?" <<endl;
  38.         cin>> res;
  39.         if(res== "yes") {
  40.             cout << "Dine together."<<endl;
  41.         }
  42.         if(res== "no"){
  43.             cout << "Do you enjoy a hot beverage?"<<endl;
  44.             cout << "What is the response?(yes or no)"<<endl;
  45.             cin >> hot;
  46.         }
  47.             if (interest== "yes"){
  48.                 cout << "Why don't we do that togehter?"<<endl;
  49.                interest=7;
  50.                cin >> interest;
  51.             }
  52.                 if (hot== "no"){
  53.                     cout << "Recreational activity?"<<endl;
  54.                     for(i== 0; i<=5; i++) {
  55.                         cout << "Tell me one of your interests."<<endl;
  56.                         cout << "Do I share that interest(yes or no)?";
  57.                         cin >> interest;
  58.                         if (i==5 && interest== "no"){
  59.                             cout<< "Choose least objectional interest."<<endl;
  60.                             cout << "Partake in interest.";
  61.                          }
  62.  
  63.                         if (interest== "yes"){
  64.                             i = 5;
  65.                             cout << "Why don't we do that togehter?"<<endl;
  66.                             cout << "Partake in interest." <<endl;
  67.  
  68.                          }
  69.  
  70.                 }
  71.  
  72.  
  73.             if (hot== "yes"){
  74.                 cout<< "1.Tea?, 2.Coffee?, 3.Cocoa?"<<endl;
  75.                 cin>> drinks;
  76.                 if (drinks== 1){
  77.                     cout << "Have tea."<<endl;
  78.                 }
  79.                 if (drinks== 2){
  80.                     cout << "Have coffee."<<endl;
  81.                 }
  82.                 if (drinks== 3){
  83.                     cout << "Have cocoa."<<endl;
  84.  
  85.                 }
  86.  
  87.             }
  88.  
  89.         }
  90.  
  91.             cout<< "Begin friendship!"<<endl;
  92.  
  93.  
  94.  
  95.  
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement