Use the pointers p1, p2, and p3 as a first number, the second number and the sum respectively and complete the following program to read two integers and display the sum of the integers between them. For example, if the user enters 6 and 10, the program should display 24 (7+8+9). The program should force the user to enter numbers less than 100 (<100) or greater than 0 (>0) and the first integer should be less than the second, else display "Invalid value".
Sample code:
#include <stdio.h> int main(void){ int *p1,*p2,*p3,i,j,sum; p1 = &i; p2 = &j; p3 = ∑ //Your code return 0; }
Sample Input 1:
6 10
Sample Output 1:
24 (7+8+9)
Sample Input 2:
10 6
Sample Output 2:
Invalid value
Hidden content!#include <stdio.h>int main(void){ int *p1,*p2,*p3,i,j,sum = 0; p1 = &i; p2 = &j; p3 = ∑** * ** * *** * * * * * * * * *** * * %d",&i,&j);