URI Problem 1046 – (Game Time) solution( Bangla ) | C language

** Before watching the solution please make sure that you have tried enough **

#include <stdio.h>

int main()
{
    int a,b,c;
    scanf("%d %d", &a, &b);
    if (a == b){
        printf("O JOGO DUROU 24 HORA(S)\n");
    }
    else if (b > a){
        printf("O JOGO DUROU %d HORA(S)\n", b - a);
    }

    else if (a > b){
            b = b + 24;
        printf("O JOGO DUROU %d HORA(S)\n", b - a);
    }

    return 0;

}

 

You can find video explanation of this solution in our YouTube channel. You will find the YouTube channel link in the top right corner.
Like our Facebook page and SUBSCRIBE to our YouTube channel.
Stay connected.

If you face any problem, let me know in the comment section.

Leave a Comment