You are on page 1of 1

Write a C, C++ or Java program that has an arithmetic operation overflow.

public class Main {

public static void main(String[] args) {

int i;
for(i = 1; 0 <= i ; i++){
}
System.out.println(i + " - Overflow value");
System.out.println(" "+Integer.MAX_VALUE+" - The max value of the
int data type");
}

You might also like