ВУЗ:
Составители:
Рубрика:
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
case 2: printf("Can't create text file \"output.txt\".\n");
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
case 3: printf("The number of registrs must be more than 0!\n");
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
case 4: printf("Wrong syntaksis in file!\n");
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
case 5: printf("No such command exists!\n");
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
case 6: printf("Command tried jump to non-existing string in file.\n");
printf("Work of programm has finished. Press <ENTER> to halt");
getchar(); clrscr(); break;
}
}
void z(char swt)
{
int i=-1, j, num=0;
char litera, str[5];
litera=fgetc(input);
if(litera!='(')
{fprintf(output,"With error\n%i",massiv[0]); error(4); exit(0);}
while(litera!=')') {i+=1; str[i]=fgetc(input); litera=str[i];}
for(j=0;j<i;j++) num+=(str[j]-48)*pow(10,i-j-1);
if(swt=='z') massiv[num-1]=0;
else massiv[num-1]+=1;
fgetc(input);
}
void t(void)
{
int i, j, k, num[2];
char litera, str[5];
for(i=0;i<2;i++) num[i]=0;
litera=fgetc(input);
if(litera!='(')
{fprintf(output,"With error\n%i",massiv[0]); error(4); exit(0);}
i=-1;
for(k=0;k<2;k++)
{
while(litera!=',' && litera!=')')
{i+=1; str[i]=fgetc(input); litera=str[i];}
for(j=0;j<i;j++) num[k]+=(str[j]-48)*pow(10,i-j-1);
i=-1;
litera='0';
}
massiv[num[1]-1]=massiv[num[0]-1];
fgetc(input);
Страницы
- « первая
- ‹ предыдущая
- …
- 59
- 60
- 61
- 62
- 63
- …
- следующая ›
- последняя »