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 |
Write a program to print all permutations of a given string.
What is the difference between typedef struct and struct?
Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table
What is structure data type in c?
write c program to display output 10(10+20)+(10+20+30)+ ... n term
0 Answers Hindustan Gum Chemicals,
How can you be sure that a program follows the ANSI C standard?
Why c is called a mid level programming language?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is structure packing in c?
What is a char c?
a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?
what is the use of ~ in c lang?????