Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
How do you retrieve input in C?
Hello, i'd like to know how to read input from the console in C. Please help me.
1 ответ
+ 3
You have to declare the variables first to store user input.For integers use:
int var_name = 0;
scanf("%d",&var_name);//to get user input
printf("%d",var_name);
For string use %s and no need to add ampersand sign.