Изменить 'du4/program.c'
vv
This commit is contained in:
parent
67e9fdfc10
commit
485f9e1056
@ -15,17 +15,19 @@ int main(){
|
||||
char* ptr;
|
||||
bool equals = false;
|
||||
|
||||
for(int i = 0; fgets(input, 100, stdin); i++){
|
||||
for(int i = 0; fgets(input, 100, stdin) != NULL; i++){
|
||||
counter = 0;
|
||||
operation = 0;
|
||||
equals = false;
|
||||
memset(number1, '\0', 25);
|
||||
memset(number2, '\0', 25);
|
||||
|
||||
while (input[counter] != '\0'){
|
||||
while (input[counter] != '\0' && input[counter] != '\n'){
|
||||
symbol = input[counter++];
|
||||
while(isspace(symbol))
|
||||
symbol = input[counter++];
|
||||
if(symbol == '\0' || symbol == '\n')
|
||||
break;
|
||||
switch(symbol){
|
||||
case '+':
|
||||
operation = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user