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

Function findlargest

Lab_06/Source.cpp:145–162  ·  view source on GitHub ↗

Overloading function for inputing 3 in the main menu

Source from the content-addressed store, hash-verified

143
144// Overloading function for inputing 3 in the main menu
145int findlargest(int n1, int n2, int n3)
146{
147
148 if (n1 >= n2 && n1 >= n3)
149 {
150 cout << "Largest number: " << n1 << endl;
151 }
152 if (n2 >= n1 && n2 >= n3)
153 {
154 cout << "Largest number: " << n2 << endl;
155 }
156 if (n3 >= n1 && n3 >= n2)
157 {
158 cout << "Largest number: " << n3 << endl;
159 }
160
161 return n1, n2, n3;
162}
163
164double findlargest(double n1, double n2, double n3)
165{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected