Пример #1
0
int main() {
  int i;
  float d;
  char s[100] = {0};
  minscanf("%d %f %s\n", &i, &d, s);

  printf("%d %f %s\n", i, d, s);
}
Пример #2
0
main()
{
    int huzzah;
    float ahoy;
    char doh[1000];
    printf("enter text in this form:\nhuzzah %%d ahoy hoy %%f doh %%s\n\n");
    minscanf("huzzah %d ahoy hoy %f doh %s", &huzzah, &ahoy, doh);
    printf("\nhuzzah:\t%d\nahoy hoy:\t%f\ndoh:\t%s\n", huzzah, ahoy, doh);
}
Пример #3
0
int main()
{
    int i,j;
    float f;
    char s[MAXWORD];


    printf("Enter an int and a float\n");
    printf("> ");
    minscanf("%i %f",&i, &f);
    printf("You entered: %i and %f\n",i,f);
    
    printf("\nEnter a string\n");
    printf(">");
    minscanf("%3s",s);
    printf("The first 3 letters are %s\n",s);


}
int main(int argc, char *argv[])
{
    float f, f2;
    char s[50];
    char c;
    int n1, n2;
    minscanf("%f %s %f %c", &f, s, &f2, &c);
    printf ("%f %s %F %c", f, s, f2, c);
    return 0;
}
Пример #5
0
int main()
{
	int res = -1;
	
	minscanf("c %d", &res);

	if (res != -1)
		printf("%d\n", res);

	return 0;
}
Пример #6
0
int main() {
	char string[100];
	double f;
	int i;
	printf("\n\n");
	// 1 2.3 tianye
	// Result IS 1 2.30000 tianye
	minscanf("%d %f %s", &i, &f, string);
	printf("\n\n RESULT IS %d, %s, %f", i, string, f);
	return 1;
}