تم تعديل الأخطاء النحوية ,, ولكن توجد هناك أخطاء أخرى في منطق البرنامج :
كود:
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main ()
{
int h1,h2,h3,h4,m1,m2,m3 ;
printf(" please enter the time of the flight %d%d",h1,m1);
scanf("%d%d",h1,m1);
printf("please enter how long the flight take%d%d",h2,m2);
scanf("%d%d",h2,m2);
(h3 = h1+h2);
if (h3 <=12)
{
printf("you will reach the city at %d",h3);
printf("a.m");
}
else if ( h3>12)
{
h3=(h1+h2)-12 ;
printf("you will reach the city at %d",h3);
printf("p.m");
}
m3 = m1 + m2 ;
if ( m3<60)
{
printf ("%d",m3);
}
else if ( m3>=60)
{
printf("( m1+m2)-60"),m3 ;
printf("h1+h2+1",h3);
}
getch ();
}
عدلي الذي باللون الأحمر .