*号的使用
1 #include <stdio.h> 2 3 int main(void) 4 { 5 unsigned width, precision; 6 float height; 7 printf("Please enter you height(enter a tag before):\n"); 8 scanf("%*s %f", &height); 9 printf("Please enter width and precision:\n"); 10 scanf("%d %d", &width, &precision); 11 printf("your weight: --%*.*f--\n", width, precision, height); 12 }
时间: 2024-10-10 23:27:39