C++ program to find the largest & smallest of three numbers. (Use inline function MAX and MIN).

include <iostream>  

using namespace std;  

int main() {      

float n1, n2, n3;  

cout << "Code by Code.Champ " << endl;  

cout << "Enter three numbers: ";  

cin >> n1 >> n2 >> n3;  


if(n1 >= n2 && n1 >= n3)  

cout << "Largest number: " << n1;  

if(n2 >= n1 && n2 >= n3)  

cout << "Largest number: " << n2;  

if(n3 >= n1 && n3 >= n2)  

cout << "Largest number: " << n3;  

return 0;  

  } 


For more follow on Instagram: Code Champ

Draw Shin Chan using Python Turtle: https://youtu.be/JqS5NJV2chk
Draw Doremon using Turtle in python : https://youtu.be/mfPfSERU2K0
Print name using Python Turtle: https://youtu.be/5XcSBJqQMIc
Indian Flag using Python Turtle: https://youtu.be/XSulTcyWAoE
Amazing Design/ pattern using Python Turtle: https://youtu.be/fIYzTIjJdT4 
Amazing 2Design/ pattern using Python Turtle:  https://youtu.be/5gX09uVdjlo

Difference  between C++ and Java: https://youtu.be/oSLL27bIXKQ

Types of application in java: https://www.instagram.com/p/CUIBrSmv6LM/

No comments:

Powered by Blogger.