Write a programm such that
if user enter 11.25 it roundup to 11
but if user enter 11.51 upto 11.99 it will round up to 12
i.e.;convert the floting point value into integer format as
explain above..
Answers were Sorted based on User's Feedback
Answer / gsrinivas
#include<sdtio.h>
#include<math.h>
void main()
{
float x;
int y;
printf("\n entere the no");
scanf("%f",&x);
y=ceil(x);
y=floor(x);
printf("\n %d",y);
}
| Is This Answer Correct ? | 2 Yes | 1 No |
What is sorting in c plus plus?
What does %p mean c?
What's wrong with "char *p = malloc(10);" ?
What are data breakpoints?
Which weighs more, a gram of feathers or a gram of gold?
Difference between Shallow copy and Deep copy?
What is calloc()?
why integer range between -327680to+32767
What oops means?
how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help
implement NAND gate logic in C code without using any bitwise operatior.
Write a program to accept a character & display its corrosponding ASCII value & vice versa?