Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 03 / Solutions / task6.cpp
blob: 8d0beac41b9019ea722732f1d94c1031dad83561 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<iostream>
using namespace std;
int main()
{
	 unsigned int number = 0, input = 1;

	 while(input != 0)
	 {
		  cout << "Enter a positive number: ";
		  cin >> input;

		  number ^= input;
	 }

	 cout << "The single number is " << number << endl;

	 return 0;
}