18 lines
347 B
C
18 lines
347 B
C
#include <stdio.h>
|
|
#include <stdlib.h> // atoi
|
|
|
|
int main(int argc, char *argv[]) {
|
|
// 1. Валидация ввода
|
|
if (argc != 3) {
|
|
printf("ER: input parameters \n");
|
|
return 1;
|
|
}
|
|
|
|
// 2. Формирование массива int
|
|
int x1 = atoi(argv[1]);
|
|
int x2 = atoi(argv[2]);
|
|
|
|
printf("OK:%d \n", x1+x2);
|
|
|
|
return 0;
|
|
}
|