Instructions:
Sample Results:
Input
Multiple lines containing an integer.
2
6
Output
Multiple lines containing an integer.
4
36
#include <iostream>
int main()
{
int num;
std::cout << "Input integers: " << std::endl;
do
{
std::cin >> num;
std::cout << num*num << std::endl;
} while (num != 0);
return 0;
}
Comments
Leave a comment