Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. #include "plik.h"
  5.  
  6. int main() {
  7.    
  8.     powitanie();
  9.     zapytanie();
  10.     input();
  11.     answer();
  12.    
  13.     return 0;
  14. }
  15.  
  16. void powitanie() {
  17.     cout << "Hello." << endl;
  18.  }
  19.  
  20. void zapytanie(){
  21.     cout << "Czy umyles juz dzisiaj rece?" << endl;
  22. }
  23.  
  24. string input(){
  25.     string odpowiedz;
  26.     cin >> odpowiedz;
  27. return odpowiedz;
  28. }
  29.  
  30. string answer(string odpowiedz){
  31.     if(odpowiedz == "tak"){
  32.         cout << "Ciesze sie bardzo, mozesz zjesc obiad." << endl;
  33.     } else if(odpowiedz == "nie"){
  34.         cout << "Bardzo bym prosil bys umyl rece przed jedzeniem" << endl;
  35.     } else {
  36.         cout << "Nie mozna odpowiadac w taki sposob na pytanie wyboru." << endl;
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement