Here is the code
#include <stdio.h>
#include<iostream>
using namespace std;
//function bear which converts double to integer
int bear(double x) // double variable is passed to function
bear
{
int y;
y=x; // when we assign double value to integer variable then
fraction part is removed
return y; // returns integer
}
// Main code starts here
int main()
{
double variable;
int a;
cin>>variable;
a=bear(variable);
cout<<a;
return 0;
}
output
2.15
2
output snippet

using C++ for beginners Create a function named Bear that takes in a double and returns...
using C++ in beginner form Create a function named absoluteValue that takes in a number and returns the absolute value of it (e.g. if it takes in 5 or -5 it will return 5)
Create a function named make_polite that takes in a string named message and returns it with ", please"added to the end. Test the function by calling it on the following messages: "Pet the dog" and "Walk the dog". Make sure you print the result of calling it. Please write in Python
Create a public static method named valueG that takes an ArrayList of type Double and returns a double. This method returns the maximum result ( do not return the original value) of taking the sine of each value from the input
I need to create a function named hailstone that takes the starting integer as a parameter and returns how many steps it takes to reach 1. You will stop when you reach the first one. If the starting integer is 1, the return value should be 0. The function should just return the value not display it. You CANNOT use recursion. C++
create a javascript function named sumBeyond that takes in an array of numbers and returns the summation of the values in the array that are greater than (but not including) 42. If there are no values greater than 42, the function should return 0. example- sumBeyond([2,85,932,0,7,-5,0,32]) must return 1017
*Java* Create a public static method named maxRes that takes an ArrayList of type Double and returns a double. This method returns the maximum result (do not return the original value) of taking the tangent of each value from the input
Write a recursive function named arithmeticSum that takes a positive integer parameter n and returns the sum of the integer numbers from 1 to n Please write in C++
Create a C# Using a GUI, Define a Method named CalcPay that takes as argument the hours and rate and return the gross pay, the method signature is as follow: public static double CalcPay(double hours, double rate) Take into consideration that an employee has to be paid 1.5 the rate for the hours more than 40.
create a javascript function named bbqFood that takes in an object and returns an array. The input object will have strings naming party foods as the key and the numbers of people that each key will feed as its values. return an array containing all of the keys whose values are greater than 10, menaing it will feed more than 10 people. example bbqfood(['taco':15, 'hamburger':6,'pasta':42,'fruit':23}) must return ['taco','pasta','fruit']
Java arrays Create method named repeatedN that takes two integer parameters named range and n and returns an integer array Method should return an integer array that has numbers 0 - range repeated in order n times If range is less than or equal to 0; return an array that has 0 repeated n times Create a second method named printArray that takes an integer array as a parameter. The method should print out every element on the same line...