Home > Back-end >  The scanf (" % d: % d ", & a & b); How to let a colon between and % d % d
The scanf (" % d: % d ", & a & b); How to let a colon between and % d % d

Time:09-25

The scanf (" % d: % d ", & amp; A, & amp; B); How to let a colon between and % d % d

CodePudding user response:

Press the shift and at the same time;

CodePudding user response:

% d and can be used between % d: % s

CodePudding user response:

If is % s, is there a way to input behind the colon

CodePudding user response:

reference lyhlw007 reply: 3/f
if it is % s, is there a way to enter the colon behind yao



Printf (" do enter client inf: \ n ");
For (I=0; i {
int ch;
Char * p=client [I]. Name;
While ((ch=getchar ())!={
':')* p=ch;
p++;
}
The scanf (" % d ", & amp; The client [I] num);

Printf (" % d, % s \ n ", client [I]. Name, client [I] num);
}

It can be

CodePudding user response:

The upstairs method should be able to achieve your needs
  • Related