I'm in my second week of programming and need some help here is what i have so far

#include <iostream> /*for cin and cout*/

int main () /*function main*/

{

int x,x2,x3,sum,number=0,product=0,largest=0,smallest= 0; /*declaration of variables*/

float avg;

std::cout << "Please enter an interger" << std::endl; /*input data*/

std::cin >> x;

std::cin >> x2;

std::cin >> x3;

sum = x + x2 +x3; /*total score*/

avg = (sum)/2; /*average score*/

std::cout << "The number of the integers is" << number << std::endl;

std::cout << "The sum of the integers is" << sum << std::endl;

std::cout << "The average of the integers is " << avg << std::endl;

std::cout << "The product of the integers is " << product << std::endl;

std::cout << "The largest integers is " << largest << std::endl;

std::cout << "The smallest integers is " << smallest << std::endl;

return 0;

}

is there any way to have infintive input until a user enters -1???