Challenge: Convert Double Value into Integer

Test your understanding by solving a simple challenge.

We'll cover the following

Problem statement

In this challenge, your task is to convert the variable value from double to an int.

Input

We have already initialized the variable double_value at the backend.

double double_value = 70.986;

Output

int_value should store the required output.

int_value = 70

📝 Please use the variables double_value and int_value or your code will not pass the test case.

Coding exercise

Before diving directly into the solution, try to solve it yourself.Then, check if your code passes all the test cases.

Good luck! 👍

Get hands-on with 1200+ tech skills courses.