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

Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1089


What is the difference between the expression “++a” and “a++”?

1275


What is main () in c language?

1187


When should we use pointers in a c program?

1196


What is a void pointer in c?

1158


Is there a built-in function in C that can be used for sorting data?

1341


Tell us the use of fflush() function in c language?

1201


Explain argument and its types.

1114


What is the use of define in c?

1103


What library is sizeof in c?

1142


When do we get logical errors?

1175


What are pointers really good for, anyway?

1117


What is the process to generate random numbers in c programming language?

1220


How was c created?

1093


What is string function in c?

1049