SHARE
TWEET

Cards

Courbe_Impliquee Mar 21st, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <clocale>
  4. using namespace std;
  5. int main()
  6. {  
  7.     setlocale(LC_ALL, "rus");
  8.     int n, a, b = 0;
  9.     cout << "Введите кол-во карточек" << endl;;
  10.     cin >> n;
  11.     b = (n*n + n) / 2;
  12.     for (int i = 0; i < n - 1; i++) {
  13.         cout << "Введите номер карточки : ";
  14.         cin >> a;
  15.         b -= a;
  16.     }
  17.     cout << "Номер оставшейся карточки: " << b << endl;
  18.     system("pause");
  19.     return 0;
  20. }
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