Hi! I'm new in turbo C... and I'm trying to make a Program to calculate the product of two numbers.
please help me! I'm using Turbo C v3.0
this error occured:
25:Declaration terminated incorrectly
please help me! I'm using Turbo C v3.0
this error occured:
25:Declaration terminated incorrectly
Code:
#include<stdio.h>
int a, b, c;
int product (int x, int y);
main()
{
//input first number
printf("enter a number between 1 and 100: ");
scanf("%d", &a);
//input second number
printf("enter another number between 1 and 100: ");
scanf("%d", &b);
c = product(a, b);
printf ("%d times %d = %d\n", a, b, c);
return 0;
}
int product( int x, int y);
{
return (x * y);
}
Comment