fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5. /* variable definition: */
  6. int count, value, total;
  7. /* Initialize */
  8. count = 0;
  9. total = 0;
  10. // Loop through to input values
  11. int N;
  12. printf("Enter the number of days you ran this week: \n ");
  13. scanf("%d",&N);
  14. while (count <= N){
  15. printf("Enter miles run: %d\n", value);
  16. scanf("%d", &value);
  17. total = total + value;
  18. printf("Total mile this week = %d\n", total);
  19. else {
  20. printf("What?!?!\n");
  21. }
  22. return 0;
  23. }
  24. }
  25.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2
1
1
compilation info
prog.c: In function ‘main’:
prog.c:19:2: error: ‘else’ without a previous ‘if’
  else {
  ^~~~
stdout
Standard output is empty