MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Large

Function Large

Lab_06/Source.cpp:186–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184// overloading function with templates
185template <class T>
186T Large(T n1, T n2, T n3)
187{
188 if (n1 >= n2 && n1 >= n3)
189 {
190 cout << "Largest number: " << n1 << endl;
191 }
192 if (n2 >= n1 && n2 >= n3)
193 {
194 cout << "Largest number: " << n2 << endl;
195 }
196 if (n3 >= n1 && n3 >= n2)
197 {
198 cout << "Largest number: " << n3 << endl;
199 }
200 else if (n1 == n2 == n3)
201 cout << "Largest number : " << n3 << endl;
202
203 return n1, n2, n3;
204}
205
206/////////////////////////////////////***STARTING POINT***////////////////////////////////////////////////////
207int main()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected