Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- float SoLonHon(float a, float b){
- float Max = a;
- if (Max <= b) Max = b;
- return Max;
- }
- void Slove(){
- //Khai bao
- float a, b;
- //Input
- cout << "Nhap so thuc a: ";
- cin >> a;
- cout << "Nhap so thuc b: ";
- cin >> b;
- //Output
- cout << "So lon nhat giua hai so "<<a<<" va "<<b<<" la "<< SoLonHon(a,b)<<"" << endl;
- }
- int main(){
- Slove();
- system("pause");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement