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 fined second smallest and largest element in a given series of elements (without sorting)
#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?
What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }
What is the use of linkage in c language?
#include<stdio.h> #include<conio.h> struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.
how to execute with out main in cprogram
Give me the code of in-order recursive and non-recursive.
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
how to print 2-D array using a single for loop?
2 Answers Mind Tree, TCS, Value Labs,
Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001
how we can say java is platform independent, while we require JVM for that particular Operating System?
what is c?