You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
318 B
C++
19 lines
318 B
C++
10 years ago
|
#include <cassert>
|
||
|
#include <iostream>
|
||
|
|
||
|
int main() {
|
||
|
assert(0/2 == 0);
|
||
|
assert(1/2 == 0);
|
||
|
assert(2/2 == 1);
|
||
|
assert(3/2 == 1);
|
||
|
assert(4/2 == 2);
|
||
|
assert(5/2 == 2);
|
||
|
|
||
|
assert(0.0/2 == 0);
|
||
|
assert(1.0/2 == 0.5);
|
||
|
assert(2.0/2 == 1);
|
||
|
assert(2.0/2 == 1.0);
|
||
|
|
||
|
std::cout << "divided we stand." << std::endl;
|
||
|
}
|