程序运行到一般停止,求解。
#include<stdio.h>//问题已经解决
struct data{
float amount;
char fname;//char fname[30]
char lname;//char lname[30]
}rec;
int main(void)
{
printf("Enter the donor's first and last names.\n");
printf("separaed by a space: ");
scanf("%s %s",rec.fname,rec.lname);
printf("\nEnter the donation amount");
scanf("%f",&rec.amount);
printf("\nDonor %s %s gave %f",rec.fname,rec.lname,rec.amount);
return 0;
}
[ 本帖最后由 love24114 于 2011-7-14 19:40 编辑 ]