program 9. Write a program accept three numbers check whether   first number is between   other two. #include<stdio.h> void main...

C Program to check whether first number is between two others.

 


program 9. Write a program accept three numbers check whether first number is between other two.

#include<stdio.h>

void main()

{

    int a,b,c;

    printf("Enter three numbers:");

    scanf("%d%d%d",&a,&b,&c);

    if(a<c && b<a)

    {

        printf("%d is between %d to %d \n",a,b,c);

    }

    else

    {

        printf("%d is not between %d to %d",a,b,c);

    }

}

Output

Enter three numbers:8 1 9

8 is between 1 to 9

0 coment�rios:

HTML5 CSS3 TUTORIAL FOR BEGINNERS