Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<iostream>
  3. #include<conio.h>
  4. int prawda()
  5. {
  6.   printf("Masakra jest fajny so much\n");
  7.   printf("Podaj 1. liczbe: ");
  8.   int liczba1;
  9.   std::cin >> liczba1;
  10.   printf("Podaj 2. liczbe: ");
  11.   int liczba2;  
  12.   std::cin >> liczba2;
  13.   printf("Co chcesz z tym zrobic?(dodaj, odejmij)\nWynik to (tak wiem nie wybrales opcji xd, ale jestem za leniwy) :\n");
  14.   int wynik = liczba1 + liczba2;
  15.   std::cout << wynik;
  16.   return 0;
  17. }
  18.  
  19. int falsz()
  20. {
  21.   printf("Musk is so bad\n");
  22.   printf("Daje Ci jeszcze jedną szanse na podanie dobrego pinu!\n");
  23.   int Pin3;
  24.   std::cin >> Pin3;
  25.   if( Pin3 == 20 )
  26.     prawda();
  27.   else
  28.     printf("ale jestes glupi -,-");
  29.   return 0;  
  30. }
  31.  
  32. int main()
  33. {
  34.   int Pin1;
  35.   const int pin2 = 20;  
  36.   std::cout << "Podaj super tajny pin!: ";
  37.   std::cin >> Pin1;
  38.   if( Pin1 == pin2 )
  39.     prawda();
  40.   else
  41.     falsz();
  42.  
  43.  
  44.   return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement