program add; {program to add 2 numbers and output the result} uses wincrt; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG No variable declarations
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG ; No semi colon
program add; program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG { Missing curly bracket
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(first_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG Incorrect variable used
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write(Enter first number: ); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG No quotes around text
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end SPOT THE BUG. Missing full stop
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',first_num); end. SPOT THE BUG Incorrect variable used
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ' total); end. SPOT THE BUG, Missing comma
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer second_num : integer total : integer begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG ; ; Missing semi colons ;
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; secon_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG Variable names inconsistent
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readl(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG Keyword not correct
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; start write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG Incorrect keyword
program add {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total := firstnum + second_num; write('Total: ',total); end. SPOT THE BUG 2 errors
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: ') readln(first_num); write('Enter second number: ') readln(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG 2 errors
program add; {program to add 2 numbers and output the result} uses wincrt; var first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readln(second_num); total = first_num / second_num; write('Total: ',total); end. SPOT THE BUG 2 errors
program add; {program to add 2 numbers and output the result} uses wincrt; va first_num : integer; second_num : integer; total : integer; begin write('Enter first number: '); readln(first_num); write('Enter second number: '); readl(second_num); total := first_num + second_num; write('Total: ',total); end. SPOT THE BUG 2 errors
That’s all folks!