input code:

output:

code:
#include <iostream>
using namespace std;
/*make method*/
int absoulevalue(int n)
{
/*if n<0 than multiply with -1*/
if(n<0)
{
return -1*n;
}
else
{
/*else return as it is*/
return n;
}
}
int main()
{
/*declare the variables*/
int n;
/*take input from user*/
cout<<"Enter the n:";
cin>>n;
/*call method*/
n=absoulevalue(n);
/*print output*/
cout<<"output is:"<<n;
return 0;
}
using C++ in beginner form Create a function named absoluteValue that takes in a number and...
Using C++ in beginner form 1.) Create a function that takes in a number and outputs a box of stars of that size. 2.) Create a function that takes in a number and outputs all the primes up until and including that number.
using C++ for beginners Create a function named Bear that takes in a double and returns the integer part (e.g. if it takes in 2.15 it returns 2)
1. Create a function template that takes a number as an argument and returns the absolute value. The absolute value of a number is the number without the sign, such that the absolute value of -5 is 5 and the absolute value of +5.0 is 5.0. Test your function with at least two numeric data types. c++
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++
In Python beginner code: Write a function named even_div, that takes two arguments (you can safely assume that both arguments will always be non-zero integers). When this function is called, it should return how many times the first argument can be divided by the second argument, if it is evenly divisible (no remainder). If it is not evenly divisible, the function should return 0. Examples: even_div(5, 2) will return 0 (5 divided by 2 is 2.5, not evenly divisible) even_div(10,...
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
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
Java two dimensional arrays Create a method named curiousNumber that takes an integer named num as a parameter and returns a boolean. You can assume the num will be a positive integer. The curiousNumber method should determine whether num is a curious number. A curious number is a number that is equal to the sum of the factorial of each of its digits. For example, 145 is a curious number because 145 = 1! + 4! + 5!. sample: boolean...
Create a new file named spherevolume.py that does the following: Define a function named sphereVolume that accepts a radius value as an argument and returns (not prints) the volume of a sphere with that radius. Write code to test your function with the following inputs: sphereVolume(2.0) // should return 33.510321638291124 or a number close to it. sphereVolume(5.0) // should return 523.5987755982989 or a number close to it.
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']