السلام عليكم
ابى اعرف اذا حلي صحيح ام لا للسؤال التالي:
Question: Write a program that gets the ID (as integer), gender (as Character), and temperature (as double) from the user. Then, display the values of the three variables using one printf statement
كود:
int main(void)
{
int id;
char gender;
double temp;
scanf("%d",&id);
printf("please enter your id :\n",id);
scanf("%c",&gender);
printf("please enter your gender :\n",gender);
scanf("%lf",&temp);
printf("please enter your temp :\n",temp);
return(0);
}