Dmitry Telenkov há 1 mês atrás
pai
commit
ad6eae4e9e
3 ficheiros alterados com 11 adições e 4 exclusões
  1. 9 2
      c/test/main.c
  2. BIN
      c/test/main.exe
  3. 2 2
      tmp/tmp.txt

+ 9 - 2
c/test/main.c

@@ -48,13 +48,20 @@ static int scanf_test(void)
 
     //scanf("%[^\n]", s);
     //puts(s);
-
+#if 0
     char login[20];
     char password[20];
     scanf("login: %s password: %s", login, password);
     printf("login: %s\n", login);
     printf("password: %s\n", password);
-    
+#endif
+
+#if 1
+    // Считывание целого числа
+    int m;
+    scanf("%d", &m);
+    printf("m = %d", m);
+#endif
     return 0;
 }
 

BIN
c/test/main.exe


+ 2 - 2
tmp/tmp.txt

@@ -1,10 +1,10 @@
 DF awer f SSAFASAFAS awr fsdfsdaf
 sdfa wer 
 sadf sdafsdf erqwr sadf sdafsdf
-sadf sdf werw sdf gklj lkwqejr
+        sadf sdf werw sdf gklj lkwqejr
 sdfkjsa weroqw klsdjf qwerj 
 The oper deleting, changing, yanking, formatting, etc.sfds sdasdf Ajfdsdfjsd
-The count allows you to multiply the effect of an operator by performing an action a count number of times.
+The count ALlows you to multiply the effect of an operator by performing an action a count number of times.
 The motion represents the piece of text to which to apply the action defined by the operator.
 The operator determines which action you want to perform: deleting, changing, yanking, formatting, etc.
 The count allows you to multiply the effect of an operator by performing an action a count number of times.