Answer the question
In order to leave comments, you need to log in
Program not ending?
Why doesn't the program terminate as soon as it displays the sequence. The program's task has been completed, but it is waiting for input.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
char c;
int i;
printf("Vvedite stroky\n");
i = 0;
c = getchar();
while (c!=EOF)
{
if(c == ':'){
i++;
c = getchar();
}
if(i == 1){
putchar(c);
}
c = getchar();
};
printf("\n");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question