This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

27 lines
452 B
C

#include <stdio.h>
void square(int *number)
{
*number = *number * *number;
return;
}
int main(int argc, char *argv[])
{
int x;
if (argc == 1)
{
printf("You did not enter a number!\n");
}
else if (argc == 2)
{
sscanf(argv[1], "%d", &x);
printf("The number is %d\n", x);
square(&x);
printf("The number is %d\n", x);
}
else
{
printf("Invalid input.\n");
}
}