error as below:

How to solve

vs 2022 cannot recognize function "scanf" which is belong to C language, just add this command: #define _CRT_SECURE_NO_WARNINGS at the top.