The area of a square is simply the square of the side. So, you only need to write a program that receives a number as input, which is the side of the square, and returns that number squared, which will be the area of the square.
You didn't specify any language, so for example here's a C implementation that receives the side from the user and returns the area:
#include <stdio.h>
int main()
{
double side, area;
do{
printf("Enter the side of the square (must be >0): ");