12-20-2015, 10:12 AM
Kod:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c=0,i;
printf("ilk sayiyi gir ");
scanf("%i",&a);
printf("ikinci sayiyi gir ");
scanf("%i",&b);
if(a>b)
{
i=b;
sart:
if(i==a) goto yaz;
i=i+1;
c=c+1;
goto sart;
}
else
{
i=a;
sart2:
if(i==b) goto yaz;
i=i+1;
c=c+1;
goto sart2;
}
yaz:
printf("iki sayinin farki:%i \n",c);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c=0,i;
printf("ilk sayiyi gir ");
scanf("%i",&a);
printf("ikinci sayiyi gir ");
scanf("%i",&b);
if(a>b)
{
i=b;
sart:
if(i==a) goto yaz;
i=i+1;
c=c+1;
goto sart;
}
else
{
i=a;
sart2:
if(i==b) goto yaz;
i=i+1;
c=c+1;
goto sart2;
}
yaz:
printf("iki sayinin farki:%i \n",c);
system("pause");
return 0;
}