c-basic/scanf-test.c

12 lines
217 B
C
Raw Normal View History

2022-11-24 21:04:54 +01:00
#include <stdio.h>
int main() {
2022-11-24 21:39:41 +01:00
int a;
float f;
char s[20];
printf("input an integer, a float, then a string.\n");
scanf("%d %f %s", &a, &f, s);
printf("%d %f %s\n", a, f, s);
return 0;
}