#include <stdio.h>


struct fruit1

{

double price_per_pound, weight;

};


void function(struct fruit1 call);


void main()

{

static struct fruit1 apple1={0};

static struct fruit1 orange1={0};

static struct fruit1 potato1={0};

static struct fruit1 onion1={0};

function(apple1);


}



void function(struct fruit1 n){

printf("Enter an %s price_per_pound: ",n);

scanf_s("%lf",&n.price_per_pound); 

printf("Enter the weight of %ss in pounds: ",n);

scanf_s("%lf",&n.weight);

printf("The cost of %s is %lf ",n,n.price_per_pound*n.weight);


}



출력부분 %s,n cost 좀 가르쳐주세요 제대로 된 값이 안나옴 ㅠㅠ