fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define Rozmiar 5
  4. int main(){
  5. int i=0;
  6. int tmp,j;
  7. // przyklad nr 1
  8. printf("przyklad nr 1\n");
  9. for (i=0;i<Rozmiar;i++);
  10. printf("zmienna i to %d\n", i);
  11. printf("GOAL\n");
  12. system("pause");
  13.  
  14. // przyklad nr 2
  15. // 4294967297
  16. printf("przyklad nr 2\n");
  17. for (j=0;j<i;j--){
  18. j=j-1000000000;
  19. printf("podaj liczbe calkowita:");
  20. scanf_s("%d", &tmp);
  21. printf("\nPodana liczba to %d\n", tmp);
  22. }
  23. /* do indywidualnego przeanalizowania
  24.   for(i=0;i>3;i--);
  25.   printf("czy to zadziala i dlaczego?"); */
  26. system("pause");
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0s 2164KB
stdin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
compilation info
prog.c: In function ‘main’:
prog.c:9:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
     for (i=0;i<Rozmiar;i++);
     ^~~
prog.c:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
         printf("zmienna i to %d\n", i);
         ^~~~~~
prog.c:20:9: warning: implicit declaration of function ‘scanf_s’; did you mean ‘scanf’? [-Wimplicit-function-declaration]
         scanf_s("%d", &tmp);
         ^~~~~~~
         scanf
prog.c:12:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
     system("pause");
     ^~~~~~~~~~~~~~~
prog.c:26:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
     system("pause");
     ^~~~~~~~~~~~~~~
/usr/bin/ld: /home/flKldY/ccOD9nDt.o: in function `main':
prog.c:(.text.startup+0x9c): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty