Untitled
Guest 460 16th May, 2022
#include <iostream>
#include <algorithm>
using namespace std;
template <typename Typ1>
class Walec
{
Typ1 promien, wysokosc;
public:
Walec(const Typ1 promien, const Typ1 wysokosc);
template <typename Typ2>
void Pole(const Typ2 promien, const Typ2 wysokosc);
};
template <typename Typ1>
Walec<Typ1>::Walec(const Typ1 promien, const Typ1 wysokosc) :promien(promien), wysokosc(wysokosc) {}
template <typename Typ1>
template <typename Typ2>
void Walec<Typ1>::Pole(const Typ2 promien, const Typ2 wysokosc)
{
Typ2 wynik = 2 * (promien * promien * 3.1415) + (2 * promien * 3.1415 * wysokosc);
cout << "Pole walca jest rowne: " << wynik << "\n";
}
template <typename TypMax>
TypMax max(const TypMax zmienna1, const TypMax zmienna2, const TypMax zmienna3)
{
return max(zmienna1, max(zmienna2, zmienna3));
}
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Untitled
Markup | 19 | 21 hours ago
- Untitled
Markup | 25 | 23 hours ago
- Wanted to see what your conviction is on this theme
Markdown | 14 | 1 day ago
- Untitled
Markup | 67 | 2 days ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 26 | 2 days ago
- Untitled
Markup | 72 | 3 days ago
- Untitled
Markup | 80 | 3 days ago