[ create a new paste ] login | about

Link: http://codepad.org/y3t0KgwW    [ raw code | output | fork ]

C++, pasted on May 3:
1
2
3
4
5
6
7
8
9
10
11
#include<stdio.h>
int main() {
int n = 1 ; 
double k = 68.8 ; 

int odd=((int) k & ~1) ;
int test=((int) (k+1)  & ~1) ;
int even=(test>k) ? odd+1 : odd - 1 ; 

std::cout << odd << " " << even << std::endl ; 
}


Output:
1
68 67


Create a new paste based on this one


Comments: