ItzEdInYourBed

ratio.cpp

May 23rd, 2020
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. runtime error example, division by 0
  2.  
  3. #include <iostream>
  4.  
  5. int main() {
  6.  
  7.   int width = 20;
  8.   int length = 0;
  9.  
  10.   int ratio = width / length;
  11.  
  12.   std::cout << ratio << "\n";
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment