Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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..

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main return c?

980


What are the advantages of using Unions?

1103


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

1050


What is use of integral promotions in c?

1129


How do shell structures work?

1094


Which one would you prefer - a macro or a function?

1066


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1985


What are linked lists in c?

1118


What is c language & why it is used?

1096


how is the examination pattern?

2004


What is string concatenation in c?

1077


Explain how do you list files in a directory?

1059


How many header files are in c?

1017


What is a function simple definition?

1082


write a program to print largest number of each row of a 2D array

2314