Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Overview: Write a program that accepts integer values from the keyboard one at a

ID: 3564767 • Letter: O

Question

Overview: Write a program that accepts integer values from the keyboard one at a time until the absolute difference between two successive integers is greater than, or equal to, 10. [You'll need the abs() function to find the absolute value of the difference.

Specifics: Create a function called diff that evaluates the absolute difference between the last two integers. if the difference is greater than or equal to 10, the funcion will return false. Otherwise, it returns true. Your main function should contain all other logic for the program. It should call the diff function each time a new integer is entered. Pass the newly entered number to the function that will compare the two. I will leave it to you to figure out the logic of keeping track or the previous integer and comparing it to the newly entered one.

What not to do Using any of the following will drop your grade for this assignment by 70% global variables cin in diff function cout in diff function goto statements

Explanation / Answer

#include#includevoid main() { int i,flag=0; float s,a[4]; clrscr(); printf("Enter the integer"); for(i=0;i