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

Round up a Decimal number in c++..

example Note = 3.5 is as 4
3.3 is as 3

Answer Posted / vimala

void main()
{
float a,c;int b,d;
cout<<"ENTER ANY FLOAT VALUE:";
cin>>a;
b=a;c=(a-b);
if(c>=.5)
d=b+1;
else
d=b;
cout<<"AFTER ROUND UP THE DECIMAL NO IS:"<<d;
getch()
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between procedural programming and oops?

1116


Why multiple inheritance is not possible?

1055


Why do while loop is used?

1014


What is polymorphism what are the different types of polymorphism?

997


Why interface is used?

1005


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2139


How to improve object oriented design skills?

996


Can we override main method?

1181


• What are the desirable attributes for memory managment?

2211


Can we create object of abstract class?

1070


Write a program to reverse a string using recursive function?

2325


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2355


what are the different types of qualifier in java?

2253


What is encapsulation in oops?

995


What is multilevel inheritance in oop?

1016