ctype.h, getenv
This commit is contained in:
parent
f973ff8cb8
commit
23198d16f4
7 changed files with 148 additions and 12 deletions
17
05/main.c
17
05/main.c
|
@ -1,15 +1,16 @@
|
|||
#define _STDLIB_DEBUG
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
|
||||
int main(void) {
|
||||
int count; float quant; char units[21], item[21];
|
||||
while (!feof(stdin) && !ferror(stdin)) {
|
||||
count = fscanf(stdin, "%f%20s of %20s",
|
||||
&quant, units, item);
|
||||
fscanf(stdin,"%*[^\n]");
|
||||
printf("%d %g %s %s\n", count, quant, units, item);
|
||||
}
|
||||
typedef struct {
|
||||
int x;
|
||||
long y;
|
||||
} S;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue