نعم , الكود صحيح , ولكن عند إدخال متغير رقمي من المستخدم ثم بعد ذلك طلب إدخال منه حرف ,, تحدث مشكلة ,, لحلها ,, ضعي مسافة في جملة الـ scanf للمتغير الحرفي .
وكذلك لا نكتب العلامة & في جملة الطباعة printf لتحديد المتغير .
التصحيح :
كود PHP:
include <stdio.h>
# include <conio.h>
int main (void)
{
int ID;
double tempreatuer;
char gender;
printf("Enter the ID No");
scanf("%d",&ID);
printf("Enter the gender");
scanf("%c",&gender);
printf("Enter the tempreatuer");
scanf("%lf",&tempreatuer);
printf("%d%c%f",&ID,&gender,&tempreatuer);
getch();
return(0);
}