Как ее перевести в календарную дату
Как это усовершенствовать?
An optional 'm' character. This is used with string conversions (%s, %c, %[), and relieves the caller of the need to allocate a corresponding buffer to hold the input: instead, scanf() allocates a buffer of sufficient size, and assigns the address of this buffer to the corresponding pointer argument, which should be a pointer to a char * variable (this variable does not need to be initialized before the call). The caller should subsequently free(3) this buffer when it is no longer required.
#include <stdio.h>
int main()
{
char *chars;
scanf("%m[^\n]",&chars);
printf("%s\n", chars);
}
int iteration_count = 0;
for (int i = 0; i < N - 1; i++) {
for (int j = 0; j < N - i - 1; j++) {
iteration_count++;
}
}
System.out.println(iteration_count);
num
назначается значение пустого на тот момент input'а.btn
вешается слушатель события. Он не выполняется сразу, а сидит и ждёт события. При каждом возникновении события, выполняется внутренний код функции getSquareNum()
alert()
– выполняется позже, при нажатии кнопки. Выводит определённое в самом начале значение num
в квадрате. Или же берет свежее, «на сейчас», значение из input'а во втором варианте кода с «если вместо num подставить document.get...».