codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <assert.h> #include <iostream> using namespace std; int division(int a, int b) { if (b==0) { cerr << "Error at line " << __LINE__ << " in file " << __FILE__ << endl; } assert(b!=0); return (a/b); } int main () { int x = 11; int y = 0; int z; z = division(x, y); cout << "Answer is " << z << endl; return 0; }
Private
[
?
]
Run code
Submit