floor divide c 2b 2b

Solutions on MaxInterview for floor divide c 2b 2b by the best coders in the world

showing results for - "floor divide c 2b 2b"
Domenico
24 Feb 2018
1#include<iostream>
2
3int main()
4{
5  //Random float f;
6  float f = 12.33;
7  
8  //Getting the floor value of f which is the the whole number part.
9  //This will return an int.
10  int result = std::floor(f);
11  
12  //Printing the answer to the screen.
13  std::cout << result << std::endl;
14  
15  //The result should be: 12.
16  
17  //exiting.
18  return 0;
19}