#include <stdio.h>
void square(int *num)
{
    *num=(*num)*(*num);
}
int main()
{
    int number;
    printf("enter the number to be squared:\n");
    scanf("%d",&number);
    square(&number);
    printf("the square of the number is: %d",number);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: