Round up a Decimal number in c++..
example Note = 3.5 is as 4
3.3 is as 3
Answer Posted / pawarp
#include <iostream>
#include <cmath>
int main()
{
float a;
cout<<"Enter any float value to round up"<<endl;
cin>>a;
cout << round(a)<<endl;
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the main feature of oop?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
can inline function declare in private part of class?
Get me a number puzzle game-program
what is different between oops and c++
What is multilevel inheritance?
What is the difference between inheritance and polymorphism?
write string class as your own class in java without using any built-in function
What is polymorphism in oops with example?
#include
write a program to find 2^n+1 ?
What does no cap mean?
What does I oop mean?
Can destructor be overloaded?
What is the advantage of oop over procedural language?