Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3.  
  4. void main()
  5. {
  6.    int nLiczba1;
  7.    std::cout << "Podaj pierwsza liczbe: ";
  8.    std::cin >> nLiczba1;
  9.    
  10.    if(nLiczba1 == 666){
  11.        exit(1);
  12.    }
  13.  
  14.    int nLiczba2;
  15.    std::cout << "Podaj druga liczbe: ";
  16.    std::cin >> nLiczba2;
  17.  
  18.    int nWynik = nLiczba1 + nLiczba2;
  19.    std::cout << nLiczba1 << " + " << nLiczba2 << " = " << nWynik;
  20.    getch();
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement