Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab3_130

Snippet info

Language

Cpp

Visibility

public

Author

matho.camara

Created

2018-10-23T18:31:13Z

Updated

2018-10-24T09:05:56Z

#include <iostream>
using namespace std;

int main() {
   double t1,t2,t3,max;
	cout << "Input  time 1, time 2 and time 3 (minute):"<<endl;// to store numbers
    cin>>t1>>t2>>t3;
    
    //checking for bigger numbers
	if((t1>t2 && t2>t3) || (t1>t3 && t3>t2))
	{
	    max=t1;
	    	cout<<"Winner time :"<<max<<endl;
	}
	else if((t2>t3 && t3>t1) || (t2>t1 && t1>t3))
	{
	    max=t2;
	    	cout<<"Winner time :"<<max<<endl;
	}
	else if((t3>t1 && t1>t2)||(t3>t2 && t2>t1))
	{
	    max=t3;
	    	cout<<"Winner time :"<<max<<endl;
	}

    return 0;
}
INFO