C++ 5th code (Max of 2 Numbers)

#include<iostream>
#include<cmath>
int main()
{
float x , y ;
std::cout<<” Enter First Number x : “;
std::cin>>x;
std::cout<<“Enter Second Number y : “;
std::cin>>y;
std::cout<<“\n————————…


This content originally appeared on DEV Community and was authored by Mohammed Salah

#include<iostream>
#include<cmath>
int main()
{
float x , y ; 
std::cout<<" Enter First Number x : "; 
std::cin>>x; 
std::cout<<"Enter Second Number y : "; 
std::cin>>y; 
std::cout<<"\n---------------------------\n";
std::cout<<"\n\tThe max. number is = ";
std::cout<<fmax(x,y)<<std::endl; 
return 0 ; 
}


This content originally appeared on DEV Community and was authored by Mohammed Salah


Print Share Comment Cite Upload Translate Updates
APA

Mohammed Salah | Sciencx (2025-01-17T22:15:36+00:00) C++ 5th code (Max of 2 Numbers). Retrieved from https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/

MLA
" » C++ 5th code (Max of 2 Numbers)." Mohammed Salah | Sciencx - Friday January 17, 2025, https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/
HARVARD
Mohammed Salah | Sciencx Friday January 17, 2025 » C++ 5th code (Max of 2 Numbers)., viewed ,<https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/>
VANCOUVER
Mohammed Salah | Sciencx - » C++ 5th code (Max of 2 Numbers). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/
CHICAGO
" » C++ 5th code (Max of 2 Numbers)." Mohammed Salah | Sciencx - Accessed . https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/
IEEE
" » C++ 5th code (Max of 2 Numbers)." Mohammed Salah | Sciencx [Online]. Available: https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/. [Accessed: ]
rf:citation
» C++ 5th code (Max of 2 Numbers) | Mohammed Salah | Sciencx | https://www.scien.cx/2025/01/17/c-5th-code-max-of-2-numbers/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.