When using scanf, multiple values can be separated by a space character.
refer ot:lautturi.com#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[]) {
int a;
float b;
printf("Please enter 1 integer and 1 floating point number: ");
scanf("%d%f", &a, &b);
printf("values: %d , %f", a, b);
return 0;
}
output
Please enter 1 integer and 1 floating point number: 5 3.14 values: 5 , 3.140000