新手求解,,。。!
程序代码:
#include<stdio.h> int main(void) { int age; float assets; char pet[30]; printf("Enter your age,assets,and favorite pet.\n"); scanf("%d,%f",&age,&assets); scanf("%s",pet); printf("%d $%.2f %s\n",age,assets,pet); getch(); return 0; }
Enter your age,assets,and favorite pet.
输入:
38
92360.88 llama
结果显示:
38 $0.00 92360.88
为什么不是:
38 $92360.88 llama