Computer Science, asked by cadbury1980, 6 months ago

Write a program using math function to:

a) print the higher or equivalent value of the number

b) round of value of the number

c) square root of a number based on users choice



plz answer fast..... ​

Answers

Answered by tanushreetandon12aug
1

Solution:

#include

using namespace std;

int main()

{

int n = 25;

while ( n != 1 )

{

cout << n << endl;

bool isEven = n%2 == 0;

if ( isEven )

{

n = n/2;

}

else

{

n = 3*n + 1;

}

}

}

This is just an example to how to do it

Similar questions