Skip to main content

MIN MAX OF TWO NUMBERS

PROBLEM LINK
https://www.hackerrank.com/contests/y16csecs/challenges/y16-min-max-of-two-numbers

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main() {

    /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    long int a,b;
    scanf("%ld %ld",&a,&b);
    if(a==b)
    {
        printf("-1");
    }
    else
    {
     
         if(a<b)
        {
            printf("%ld %ld",a,b);
        }
        else
        {
            printf("%ld %ld",b,a);
        }
    }
    return 0;
}

Comments

Popular posts from this blog

Fundamentals of Information Technology

Click the image link (or) the normal link down below in order to download the required course handout for regarding the course "Introduction to the fundamental of Introduction to Information technology" (or) IMAGE LINK
Coding Skills Day Wise Q/'S Please click on the link down below in order to download the Coding Skills day wise q/'s  Click this Link To Download Thank you for using our services.