26 lines
415 B
C++
26 lines
415 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <list>
|
|
#include <algorithm>
|
|
#include <exception>
|
|
#include <cstdlib>
|
|
#include <ctime>
|
|
|
|
|
|
class Span {
|
|
public:
|
|
Span(unsigned int N);
|
|
Span(const Span &span);
|
|
~Span();
|
|
Span &operator=(const Span &span);
|
|
|
|
void addNumber(int nbr);
|
|
unsigned int shortestSpan() const;
|
|
unsigned int longestSpan() const;
|
|
private:
|
|
Span();
|
|
unsigned int N;
|
|
std::list<int> list;
|
|
};
|