-->

Write a program to know a number entered by you lies between two values/range or not

//a program to know a number entered by you lies between two values/range or not
#include<stdio.h>
#include<conio.h>
void main()
{
float n,range_v,range_v1;
printf("enter a number to check\n");
scanf("%f",&n);
printf("enter range values");
scanf("%f%f",&range_v,&range_v1);
if(n>range_v && n<range_v1)
{
printf("it lies in range");
}
else 
{
printf("it does not\n");
}
getch();
}

No comments:

Post a Comment