在我的代码中,第二个scanf不工作,无法读取字符。 我该如何解决这个问题? #include <stdio.h>
int main() {
int a, result;
// ***************** Menu *******************
printf("Hello !!! \n The Operations That This Calculator Can Do
如果我想输入3个数字,我可以写这样的代码: scanf("%d %d %d", &a, &b, &c);
但我怎么能动态地从一条线得到的投入是多少? 例如,如果用户输入Ñ(编号),然后我不得不从一条线获得Ñ整数输入像上面。 输入和输出应该是: how many do you want to enter: 5
1 2 3 4 5
sum: 15
我有任务让c程序轻松检查IP地址的类别。我的问题是我不在c中工作,我不知道我的程序有什么问题,因为我没有任何IDE,并且所有的东西都在Debian上编译。 #include <stdio.h>
#include <stdlib.h>
int main() {
int ip[4];
int i=0;
printf("Enter IP address: ");