Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main() {
- int a,b,c;
- // cin>>a>>b>>c;
- cout<<"Enter first no : ";
- cin>>a;
- cout<<"Enter second no : ";
- cin>>b;
- cout<<"Enter third no : ";
- cin>>c;
- if(a>b) {
- if(a>c) {
- cout<<a<<" is max";
- } else {
- cout<<c<<" is max";
- }
- } else {
- if(b>c) {
- cout<<b<<" is max";
- } else {
- cout<<c<<" is max";
- }
- }
- return 0;
- }
- //Output
- Enter first no : 12
- Enter second no : 56
- Enter third no : 23
- 56 is max
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement