URI Problem 1847 (Welcome to the Winter!) solution( Bangla ) | C language

**Before watching this make sure that you’ve tried enough**

#include<stdio.h>
int main()
{
    int a,b,c;
    while(scanf("%d",&a)!=EOF){
        scanf("%d %d",&b ,&c);
        if(a>b && b<=c)printf(":)\n");
        else if(a<b && b>=c)printf(":(\n");
        else if(a<b && b<c && (c-b)<(b-a))printf(":(\n");
        else if(a<b && b<c && (c-b)>=(b-a))printf(":)\n");
        else if(a>b && b>c && (a-b)>(b-c))printf(":)\n");
        else if(a>b && b>c && (a-b)<=(b-c))printf(":(\n");
        else if(a==b){
            if(b<c)printf(":)\n");
            else printf(":(\n");
        }
    }

    return 0;
}

 

If this solution helped you, please share this with your friends.
And if you have anything to say, let me know in the comment section.

More solutions are coming so Like our Facebook page and Subscribe to our YouTube channel to stay connected.

Leave a Comment