推介:| Web Hosting | 外賣系統 | Server colocation | Web Shop System | Makeup course |

查看完整版本: I need your help

happy_holiday 2006-12-26 20:37

I need your help

It is a C program for calculate area of rectangle.
Would you help me to test the program correct or not.
thx, I have tried, but the result is abnormal.
I feel happy if you  can help me solve this problem.
I am a newbie in Program C.

#include<stdio.h>
#include<stdlib.h>
int area(int);
int main(void)
{
    int l, w, result;
    printf("Enter length of rectangle.\n");
    scanf("%d",&l);
    printf("Enter width of rectangle.\n");
    scanf("%d",&w);
    printf("Area of the rectangle is %d\n", area(result));
    system("pause");
}
int area(int result)
{
     int l, w;
     result = l * w;
     return (result);
}

happy_holiday 2006-12-27 19:40

I have find the ans.

Thanks every one

eth1235 2007-4-2 21:27

Thanks every one
頁: [1]
查看完整版本: I need your help