This commit is contained in:
aortigos
2026-04-21 11:18:55 +02:00
parent ab04a0f8fa
commit eaf9e30206
4 changed files with 211 additions and 0 deletions

32
ex01/main.cpp Normal file
View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/04/21 10:56:22 by aortigos #+# #+# */
/* Updated: 2026/04/21 11:18:21 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "Span/Span.hpp"
int main()
{
std::vector<int> vec;
vec.push_back(5);
vec.push_back(100);
vec.push_back(10);
vec.push_back(20);
Span sp(5);
sp.addNumbers(vec.begin(), vec.end());
sp.addNumber(500);
std::cout << "Shortest span: " << sp.shortestSpan() << std::endl;
std::cout << "Logest span: " << sp.longestSpan() << std::endl;
return (0);
}