Assumed we always work with unsigned numbers for simplicity.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdbool.h>
boolisUnsignedInteger(constchar*string);intmain(intargumentsLength,char**arguments){if(argumentsLength!=4){puts("Expected three arguments.");returnEXIT_FAILURE;}if(!isUnsignedInteger(arguments[1])){puts("Expected an unsigned number for the first argument.");returnEXIT_FAILURE;}if(!isUnsignedInteger(arguments[2])){puts("Expected an unsigned number for the second argument.");returnEXIT_FAILURE;}if(!isUnsignedInteger(arguments[3])){puts("Expected an unsigned number for the third argument.");returnEXIT_FAILURE;}printf("%lld\n",atoll(arguments[1])+atoll(arguments[2])*atoll(arguments[3]));returnEXIT_SUCCESS;}boolisUnsignedInteger(constchar*string){for(constchar*character=string;*character;character++){if(!isdigit(*character)){returnfalse;}}returntrue;}
C