... HAVE U TRIED .... AT LEAST 3 TIMES ... OK U CAN SEE THIS ...

Sunday, January 12, 2014

UVA-12114 :: Bachelor Arithmetic

//Problem link>>http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=3266

//probability  greater  than  1  is impossible ... so  increase  event  is  impossible ...

#include <bits/stdc++.h>
using namespace std ;
int main ()
{
    long long int b ,s ,cas=1 ;

    while (cin>>b>>s && b||s)
    {
            b=b-1 ;
            s=s-1 ;
        if (b==0 ) cout<<"Case "<<cas<<": "<<":-\\"<<endl ;
        else if (s==b || s>b ) cout<<"Case "<<cas<<": "<<":-|"<<endl ;
        else if (s<b) cout<<"Case "<<cas<<": "<<":-("<<endl ;

        cas++ ;
    }

    return 0 ;
}

No comments:

Post a Comment